-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(oauth-provider): allow customizing branding of the login page
- Loading branch information
1 parent
2c1cd32
commit 96985fe
Showing
17 changed files
with
195 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
import type { ClientMetadata, Session } from './types' | ||
|
||
// This is injected by the backend in the HTML template | ||
declare const __backendData: | ||
| Readonly<{ | ||
clientId: string | ||
clientMetadata: Readonly<ClientMetadata> | ||
requestUri: string | ||
csrfCookie: string | ||
sessions: readonly Readonly<Session>[] | ||
consentRequired: boolean | ||
loginHint?: string | ||
}> | ||
| Readonly<{ | ||
error: string | ||
error_description: string | ||
}> | ||
export type BrandingData = { | ||
logo?: string | ||
} | ||
|
||
export const backendData = __backendData | ||
export type ErrorData = { | ||
error: string | ||
error_description: string | ||
} | ||
|
||
export type BackendData = typeof __backendData | ||
export type AuthorizeData = { | ||
clientId: string | ||
clientMetadata: ClientMetadata | ||
requestUri: string | ||
csrfCookie: string | ||
sessions: Session[] | ||
consentRequired: boolean | ||
loginHint?: string | ||
} | ||
|
||
// These values are injected by the backend when it builds the | ||
// page HTML. | ||
|
||
export const brandingData = window['__brandingData'] as BrandingData | undefined | ||
export const errorData = window['__errorData'] as ErrorData | undefined | ||
export const authorizeData = window['__authorizeData'] as | ||
| AuthorizeData | ||
| undefined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.