Custom Oauth server to authenticate via token exchange

We have an enterprise customer who requires some very specific authentication flows that I am not sure are supported out of the box. We are working to support these flows on our end and are wondering the best way to integrate with Auth0.

We are creating a custom Oauth server which we are able to intereact with and generate an signed Oauth token for our customer’s users. Are we then able to use Oauth token exchange with out auth0 application to create our user’s sessions on the front-end without having to have them login with user/password? We are currently using the react SDK, can we make this happen with the methods provided there, like loginWithRedirect?

Hi @alindelbert,

Thanks for your question.

I believe you meant “with our” rather than “with out.” If so, then yes! This is possible. You can use your Auth0 application with the authorization code flow to prompt your users to log in and establish a session with the Auth0 server. Besides using a user/password, there are other log in options, such as social, passwordless, etc.

Yes, using loginWithRedirect works. The recommended method is to redirect your users to the universal login page to authenticate.

I hope this helps!

Thanks,
Rueben

Hi @rueben.tiow,

We have managed to create a url that contains all the info needed for our users to auth with our custom oauth social connection. The only hang up now is that the user is still prompted with the login screen and have to click the connection button to connect. I tried to pass in a prompt=none url param in hopes that it would just automatically do so but it does not seem to work. Is there a way we can use our authorize link without prompting the users?

https://OUR_AUTH0_DOMAIN/authorize
  ?response_type=code
  &client_id=OUR_CLIENT_ID
  &redirect_uri=OUR_REDIRECT_URL
  &scope=openid%20profile%20email
  &connection=OUR_CUSTOM_OAUTH_CONNECTION
  &prompt=none