question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenID Connect settings

See original GitHub issue

Issue

When trying to get the token I need to pass a code from the authorize method but I can’t see a way to do this. I’m trying this add a OpenID Connect provider to this package but it’s not going too well, I have set up the following:

export const config = {
    issuer: Config.BASE_URL,
    clientId: Config.CLIENT_ID,
    redirectUrl: Config.APP_REDIRECT_URL,
    scopes: [
      'openid',
      'profile',
      'email',
      'phone',
      'profile_extended',
};

AppAuth.authorize(config)

I need to also send response_type: code when authorizing the user

When asking for the token I need to send the following:

client_assertion,
client_assertion_type,
redirect_uri,
code,
grant_type

In the current docs I can’t see anyway to do this, I have tried to use additionalParameters but this doesn’t change my outcome.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasLargecommented, Feb 7, 2021

@pke The way I got around this was by using skipCodeExchange I had to use this as we needed to manually sign

0reactions
liatnetachcommented, Dec 22, 2021

@ThomasLarge thanks for the quick reply ! I took those parameters as well. did you exchange the code for token from the app itself or from server?

*If im removing the skipCodeExchange from the config file the authorize function finish successfully so I don’t get it what is the difference

If you can give me a reference to the code where you used the code and state in order to exchange the code for token I will appreciate it

I tried to split the flow in the application and it gave me access_denied also this is my code where I get the code and try to exchange it for the token:

const {authorizationCode, state} = await authorize(config);
const code = authorizationCode;
const codeResponse = await fetch(`https://vistaprint-test.us.auth0.com/oauth/token?client_id=${config.clientId}&client_secret=${client_secret}&grant_type=authorization_code&
redirect_uri=${config.redirectUrl}&code=${code}`,
   {
     method: 'POST',
   },
 );

BTW in Android I doesn’t get the state param at all, did you had issues with it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenID Connect | Authentication - Google Developers
OpenID Connect · Obtain OAuth 2.0 credentials. You need OAuth 2.0 credentials, including a client ID and client secret, to authenticate users and ......
Read more >
OpenID Connect
OpenID Connect allows clients of all types, including Web-based, mobile, and JavaScript clients, to request and receive information about authenticated sessions ...
Read more >
How to configure SSO with OpenID Connect
How to configure SSO with OpenID Connect ; 1. Sign in to your TalentLMS account as Administrator ;, go to Home ; >...
Read more >
Managing OpenID connect configuration - IBM
Use New to configure an OpenId provider. Click New. Provide the information based on the type of configuration that you want to perform,...
Read more >
Connect to OpenID Connect Identity Provider - Auth0
Navigate to Auth0 Dashboard > Authentication > Enterprise, locate Open ID Connect, and click its + . · In the Settings view, make...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found