feat(auth-google,auth-github): Allow passing a custom callbackUrl to … (#10829)
* feat(auth-google,auth-github): Allow passing a custom callbackUrl to oauth providers * feat: Add state management in auth providers * chore: Changes based on PR review
This commit is contained in:
@@ -92,7 +92,7 @@ export const ModulesDefinition: {
|
||||
label: upperCaseFirst(Modules.AUTH),
|
||||
isRequired: false,
|
||||
isQueryable: true,
|
||||
dependencies: [ContainerRegistrationKeys.LOGGER],
|
||||
dependencies: [ContainerRegistrationKeys.LOGGER, Modules.CACHE],
|
||||
defaultModuleDeclaration: {
|
||||
scope: MODULE_SCOPE.INTERNAL,
|
||||
},
|
||||
|
||||
@@ -59,6 +59,10 @@ export type AuthenticationInput = {
|
||||
|
||||
/**
|
||||
* Body of the incoming authentication request.
|
||||
*
|
||||
* One of the arguments that is suggested to be treated in a standard manner is a `callback_url` field.
|
||||
* The field specifies where the user is redirected to after a successful authentication in the case of Oauth auhentication.
|
||||
* If not passed, the provider will fallback to the callback_url provided in the provider options.
|
||||
*/
|
||||
body?: Record<string, string>
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ export interface AuthIdentityProviderService {
|
||||
user_metadata?: Record<string, unknown>
|
||||
}
|
||||
) => Promise<AuthIdentityDTO>
|
||||
// These methods are used for OAuth providers to store and retrieve state
|
||||
setState: (key: string, value: Record<string, unknown>) => Promise<void>
|
||||
getState: (key: string) => Promise<Record<string, unknown> | null>
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user