Authorize
Last updated
Was this helpful?
Last updated
Was this helpful?
Implements the authorize endpoint that returns the Oauth2 login url.
Args:
request: The user request
connection_type: The particular connection type to use. If provided,
the rest of the arguments are used to determine which Auth0
connection to use, otherwise they are ignored and the default Auth0
login flow is started. If set to Auth0ConnectionType.SOCIAL
, the
connection
argument must be provided. If set to
Auth0ConnectionType.DATABASE
or Auth0ConnectionType.ENTERPRISE
,
the email
argument must be provided.
connection: The Auth0 connection to use. Only used if connection_type
is set to Auth0ConnectionType.SOCIAL
to choose the social
Auth0 connection to use.
email: The email to use for login. Only used if connection_type
is set to Auth0ConnectionType.DATABASE
or
Auth0ConnectionType.ENTERPRISE
to choose the Auth0 enterprise
connection to use and/or to pre-fill the email field in the login
form.
Returns: The Url to start the login flow.
Raises: HTTPException: 400 if the connection name is not provided or if the connection type is invalid, 403 if the connection is not enabled or if there is no active connection configured for the given email domain.
Enum for Auth0 connection types.
OAuth 2.0 authorization response.