nextjs-auth0-starter's People
nextjs-auth0-starter's Issues
How to avoid the boilerplate for auth check?
Thanks for the tutorial!
I'm currently struggling to create a template that can be shared by all pages so I don't have to write the auth boilerplate everytime. Is there a way around it?
https://github.com/CaptainChemist/nextjs-auth0-starter/blob/master/pages/profile.tsx#L15-L26
Having to write this all the time will be extremely tedious
const { user, loading } = useFetchUser();
if (loading) {
return (
<MainLayout>
<p>Loading...</p>
</MainLayout>
);
}
if (!user && !loading) {
Router.replace('/');
}
Error: Cannot find module 'tslib'
Error: Cannot find module 'tslib' login err
GET http://localhost:3000/api/me 401 (Unauthorized) user.tsx:9
I'm having trouble with this error code I'm getting from chromes dev console.. GET http://localhost:3000/api/me 401 (Unauthorized) user.tsx:9
.. When I open localhost:3000, in the navbar I see the Home and Login, when I click on Login I'm sent to the Auth0 Login, but every time I try to Login (either using my Auth0 login creds or through a google account) it gives me this error code as well Failed to load resource: the server responded with a status of 401 (Unauthorized) :3000/api/me:1
. I tried looking for a solution the past couple of days but came up with nothing that has worked.
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.