amaury1093 / react-redux-auth0-kit Goto Github PK
View Code? Open in Web Editor NEWMinimal starter boilerplate project with CRA, React, Redux, React Router and Auth0 authentication
License: MIT License
Minimal starter boilerplate project with CRA, React, Redux, React Router and Auth0 authentication
License: MIT License
Would you like to see this project use TypeScript?
https://react-redux-auth0.firebaseapp.com/
Site not found
On https://github.com/amaurymartiny/react-redux-auth0-kit/blob/master/src/utils/AuthService.js#L88, a call to getTokenExpirationDate passes token, as seen below:
const date = AuthService.getTokenExpirationDate(token)
However, getTokenExpirationDate does not appear to do anything with the token.
static getTokenExpirationDate() { ... }
But, I could be missing something. I can very quickly throw together a PR, if this is confirmed as a issue.
Some are a bit outdated
This line causes my linter to fail: authService = new AuthService();
I receive "Unexpected token ="
Any advice?
Thanks!
https://github.com/amaurymartiny/react-redux-auth0-kit/blob/master/src/containers/App/AppView.js#L13
My eslint file looks like this:
module.exports = {
"extends": "airbnb",
"plugins": [
"react",
"jsx-a11y",
"import"
],
"env": {
"browser": true,
},
"globals": {
"window": true,
},
"rules": {
"react/jsx-filename-extension": 0,
"no-console": 0,
"max-len": 0,
"react/prop-types": 0,
"react/no-array-index-key": 0,
"jsx-a11y/href-no-hash": 0,
"no-unused-vars": 0,
"jsx-a11y/label-has-for": 0,
}
};
After a few days of casual research, I've settle on this as the best boilerplate out there for Auth0 Embedded Login in a React/Redux app. Thank you.
One small issue: right after logging in, the page title flashes "404" just for maybe a second. Just FYI.
It might be a good idea to pull the call back up to a config.js setting so that it can be changed in one place for using this on a externally facing server.
Hi, I am working to implement my react-redux-auth0 solution based on your example. I have a couple questions that you might be able to help me with...
Why are you storing the id_token and profile in local storage? Should these not just be stored in the redux store?
Why have the checkLogin action? Is there a reason you put the "authenticated" and "authorization_error" event handlers here? I placed mine in the constructor of the AuthService (like the examples provided by Auth0). I am just trying to understand your approach.
Thanks!
I was able to get everything set up and working but the about link isn't re-rendering, even on a reload. In the Route line I added an "exact" for the '/' path and that now makes it render when reloaded but the links don't cause the page to reload.
Any suggestions?
any interest in integrating GraphQL?
Right now our file structure is made in a functional way:
|_ components
|_ containers
|_ reducers
|_ actions
It's nice, but it's not terribly efficient neither. My idea to switch to a Ducks folder structure, see here: https://medium.com/@scbarrus/the-ducks-file-structure-for-redux-d63c41b7035c.
After auth is successful - Close the page - Re-open - I am an presented with a error.
InvalidTokenError: Invalid token specified: Cannot read property 'replace' of undefined
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.