1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-10 01:19:53 +01:00
unleash.unleash/frontend/src/component/user
00Chaotic 13aa58e0e9
feat: allow admin login using demo auth (#6808)
This PR introduces a configuration option (`authentication.demoAllowAdminLogin`) that allows you to log in as admin when using demo authentication. To do this, use the username `admin`. 

## About the changes
The `admin` user currently cannot be accessed in `demo` authentication
mode, as the auth mode requires only an email to log in, and the admin
user is not created with an email. This change allows for logging in as
the admin user only if an `AUTH_DEMO_ALLOW_ADMIN_LOGIN` is set to `true`
(or the corresponding `authDemoAllowAdminLogin` config is enabled).

<!-- Does it close an issue? Multiple? -->
Closes #6398 

### Important files

[demo-authentication.ts](https://github.com/Unleash/unleash/compare/main...00Chaotic:unleash:feat/allow_admin_login_using_demo_auth?expand=1#diff-c166f00f0a8ca4425236b3bcba40a8a3bd07a98d067495a0a092eec26866c9f1R25)


## Discussion points
Can continue discussion of [this
comment](https://github.com/Unleash/unleash/pull/6447#issuecomment-2042405647)
in this PR.

---------

Co-authored-by: Thomas Heartman <thomasheartman+github@gmail.com>
2024-04-23 08:39:33 +02:00
..
Authentication chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
common chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
DemoAuth feat: allow admin login using demo auth (#6808) 2024-04-23 08:39:33 +02:00
ForgottenPassword chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Login fix: store redirect to localStorage to avoid loss of redirect (#5929) 2024-01-19 11:32:26 +02:00
NewUser chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
Profile chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
ResetPassword chore: add no unused imports biome rule (#5855) 2024-01-11 12:44:05 +00:00
SimpleAuth chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
UserProfile chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
AuthenticationCustomComponent.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
HostedAuth.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
PasswordAuth.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
StandaloneBanner.tsx chore: Bump biome and configure husky (#6589) 2024-03-18 13:58:05 +01:00
user.module.scss