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.

Can't get the result of authorize call

See original GitHub issue

Issue

Hello.

I’m trying to use authorize but can’t get the result of the call. After calling authorize auth window pops up, I fill the credentials, it closes but the code after never gets executed (nor any error caught). I tried debugging OIDAuthorizationService.m in Xcode and it looks like authorization completes successfully with the token.

const config = {
  issuer: '***',
  clientId: '***',
  redirectUrl: 'APP_URI://',
  scopes: [***]
}

try {
  const result = await authorize(config) // nothing gets executed after
  console.log({ result })
} catch (error) {
  console.log(error)
}

RN version: 0.69.5 iOS: 14.2 AppDelegate.h is configured. Info.plist is configured.

<key>CFBundleURLTypes</key>
<array>
<dict>
  <key>CFBundleURLName</key>
  <string>APP_BUNDLE_ID</string>
  <key>CFBundleURLSchemes</key>
  <array>
    <string>APP_URI</string>
  </array>
</dict>
</array>

Environment

  • Your Identity Provider: IdentityServer 4
  • Platform that you’re experiencing the issue on: both
  • Are you using Expo?: No

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
0akl3ycommented, Oct 27, 2022

I don’t know if this is the case here but I had exactly the described behavior due to a missing “/” at the end of the redirectUrl on iOS.

On Android it also worked without “/” at the end.

0reactions
bitcrumbcommented, Nov 25, 2022

Coming back to this, people are reporting that uninstalling & reinstalling the app fixes the issues. Is there any kind of persisting of data happening by this library that could explain this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Call Your API Using the Authorization Code Flow - Auth0
This tutorial will help you call your own API using the Authorization Code Flow. If you want to learn how the flow works...
Read more >
MVC application Authorization for ApiController doesn't work
I added and Authorize attribute to my api controller and I still can call it and get results from a client application like...
Read more >
Simple authorization in ASP.NET Core - Microsoft Learn
Learn how to use the Authorize attribute to restrict access to ASP.NET Core controllers and actions.
Read more >
The Authorization Response - OAuth 2.0 Simplified
Once the user has finished logging in and approving the request, the authorization server is ready to redirect the user back to the...
Read more >
Solved - 3CX - Salesforce - can't authorize token
Hi friends, The integration between Salesforce and 3CX is failing - can't authorize the token, getting the log below:
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