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.

Ability to invoke handleRedirectCallback() from the useAuth0 hook

See original GitHub issue

Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.

Thank you in advance for helping us to improve this library! Your attention to detail here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.

By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.

Describe the problem you’d like to have solved

I am currently building a Capacitor App that generates a link using buildAuthoriseUrl, navigates to that link using a popover Capacitor Browser window and then allows the user to sign in. An authorisation code is generated, however I need to manually invoke handleRedirectCallback to authenticate the user.

It would be great if the handleRedirectCallback method could be accessed anywhere using the useAuth0 hook.

Thanks!

Describe the ideal solution

Allow the handleRedirectCallback method to be accessed through the useAuth0 hook (similar to how buildAuthoriseUrl can).

Alternatives and current work-arounds

A clear and concise description of any alternatives you’ve considered or any work-arounds that are currently in place.

None at this stage.

Add any other context or screenshots about the feature request here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
adamjmcgrathcommented, Apr 20, 2021

Hey @ben-hunter-andrew-robertson - we’re going to do some work to expose the handleRedirectCallback for this use case. I’ll update this thread when we have a PR ready

0reactions
benhunterandrewrobertsoncommented, Apr 20, 2021

Fantastic, thank you very much @adamjmcgrath!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use Auth0's hook useAuth0 to get token and set header in ...
Now, there is no restriction and we can call getTokenSilently() method either in function component or class component or any other place. I ......
Read more >
Authenticating Your First React App | by Auth0 | Medium
We have been able to: Use Auth0's Universal Login; Authenticate a user using social and email; Get user information in our app; Get...
Read more >
isAuthenticated fails on login, works on refresh
I'm writing an Angular npm library to streamline Auth0 implementation for my company and running into a strange bug.
Read more >
@auth0/auth0-react
Use the useAuth0 hook in your components to access authentication state ( isLoading ... import { useAuth0 } from '@auth0/auth0-react'; function App() {...
Read more >
Securing a Chat App With React and Auth0 - GetStream.io
The call to updateUser() creates the user on our Stream chat ... Run npx create-react-app client in your project root to set up...
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