Comments (5)
@lukeoliff looks good ! however I am still wondering why it is not synchronous ? As far as I know this does not require any external http call ? So why bother with asynchronous ?
from auth0-react-samples.
Im having the same issue, did you find a solution?
from auth0-react-samples.
@upanshed I changed my code to do a manual redirect instead , you can do that by getting the router directly from the Router directive and passing that to the authentication method
<Route path="/callback" render={({history}) => {
auth.extractAndSaveUserToken(() => {
history.push("/");
}, () => {
history.push("/authError");
});
return (<div>Loading</div>);
}} />
from auth0-react-samples.
Hey @samudurand sorry for being late to this!
I addressed this exactly recently in a demo app. Check out this: I provide some state aware functions to be used as callbacks in my auth utility class.
https://github.com/lukeoliff/auth0-react-material/blob/master/www-client/src/components/App.js
from auth0-react-samples.
Closing this issue since we've just recently made some significant changes to this sample and Quickstart, utilizing the new auth0-spa-js
SDK. If you continue to experience this issue or any others, don't hesitate to create a new issue. Thanks!
References:
from auth0-react-samples.
Related Issues (20)
- way too many deprecated libraries HOT 9
- `Failed to load resource: the server responded with a status of 400 ()` error with /authorize call - misconfiguration issue HOT 7
- Handle 403 Insufficient Scope errors in UI HOT 1
- Google account picture request forbidden HOT 3
- just a spinning circle HOT 3
- How to configure multiple App Client IDs in auth_config.json file? HOT 1
- Example for User Initiated Account Linking using this library HOT 2
- How to send Organization ID to Auth0Provider? HOT 1
- failed to load resource the server responded with a status of 400 () in React Node HOT 1
- #15 5.788 Cannot find file './auth_config.json' in './src'. Error HOT 1
- Cypress and auth0-react integration not working HOT 3
- Oops... Unauthorized HOT 4
- Do I need to call getAccessTokenSilently every time I make an external API call? HOT 2
- Adjust your current browser settings from 'Strict' to 'Moderate'. HOT 2
- Request failed with status code 404 HOT 1
- Redirecting to page that user logged in from HOT 4
- Chrome - Invalid state HOT 2
- Firefox - Session lost on refresh and SSO does not work HOT 3
- Auth0-react failing silently on succesful login HOT 4
- isAuthenticated is null in auth0-react HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0-react-samples.