mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
feat(AuthRouteConstants): [Auth/PM-27370] Convert auth routes to use constants (#16980)
* PM-22663 WIP on auth route constants * PM-22663 - Convert desktop & extension to use constants - first pass * PM-22663 - Further clean up * PM-22663 - catch more missed routes * PM-22663 - add barrel files * PM-22663 - Per PR feedback, add missing as const * PM-22663 - Per PR feedback and TS docs, use same name for const enum like and derived type. Adjusted filenames to be singular. * PM-22663 - Per PR feedback update desktop app routing module since auto rename didn't update it for whatever reason.
This commit is contained in:
21
libs/angular/src/auth/constants/auth-route.constant.ts
Normal file
21
libs/angular/src/auth/constants/auth-route.constant.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Constants for auth team owned full routes which are shared across clients.
|
||||
*/
|
||||
export const AuthRoute = Object.freeze({
|
||||
SignUp: "signup",
|
||||
FinishSignUp: "finish-signup",
|
||||
Login: "login",
|
||||
LoginWithDevice: "login-with-device",
|
||||
AdminApprovalRequested: "admin-approval-requested",
|
||||
PasswordHint: "hint",
|
||||
LoginInitiated: "login-initiated",
|
||||
SetInitialPassword: "set-initial-password",
|
||||
ChangePassword: "change-password",
|
||||
Sso: "sso",
|
||||
TwoFactor: "2fa",
|
||||
AuthenticationTimeout: "authentication-timeout",
|
||||
NewDeviceVerification: "device-verification",
|
||||
LoginWithPasskey: "login-with-passkey",
|
||||
} as const);
|
||||
|
||||
export type AuthRoute = (typeof AuthRoute)[keyof typeof AuthRoute];
|
||||
1
libs/angular/src/auth/constants/index.ts
Normal file
1
libs/angular/src/auth/constants/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./auth-route.constant";
|
||||
Reference in New Issue
Block a user