Login User
Logs a user in. In this example, we call your lookup URL (let’s say, https://oauth.provider/user?t=<%= accessToken %>
) with the access token (1234
). The lookup URL returns { id: 'abcd' }
in this case. We will match this id
with the OAuthIdentity stored in the user information in our db. If everything checks out, the user is logged in and redirected to the home page.
Headers
Authorization
Basic authentication of the form Basic <username:password>.
Query parameters
provider
Your OAuth Provider ID
accessToken
Will be passed through your lookup URL to get the user ID. Required if no code
.
code
Will be passed to the OAuth token endpoint to get a token. Required if no accessToken
.
redirect
Override where the user will navigate to after successfully logging in.
errorRedirect
If an error happens, redirects the user to this url, with at least query parameters code
, errorName
and message
.