• caglararli@hotmail.com
  • 05386281520

Using OpenID 2.0 to return an Oauth token

Using OpenID 2.0 to return an Oauth token

EDIT: I've looked into the issue more and I can find some documentation for getting an OAuth token with OpenID Connect but not with OpenID 2.0. Can it be done?

We have a server application that is returning our OAuth tokens using the Python Authlib library.

We accept the oauth:grant-type:token-exchange to accept tokens from other providers to allow account linking and logging in with a provider token.

We now need to implement with another third party which only exposes OpenID 2.0. Not the more recent OpenID Connect but the deprecated OpenID 2.0.

We can't use OAuth directly for account linking with this provider.

It's very hard to find any info on this as most searches return results for using OpenID Connect with Oauth 2.0.

I've implemented some HTTP calls to redirect the user to the provider's website to log in and then validate their OpenID credentials using a server side call with openid.mode: check_authentication.

I'm wondering how to generate our own Oauth token using this.

What would be the best starting point? Trying to convert the OpenID 2.0 data to OpenID Connect data. Generate a token manually without using the library? Is there some sort of grant type for this? Can this be done?