Welcome to my Netlify Identity sample site. There is a user account set up that you can use to gain access to the "Test Auth" page and the Netlify CMS admin page.
There are three available routes in addition to this home page:
- Test Auth: This route is blocked by Netlify JWT access control. You must have a JWT with 'admin' role to enter. Without it, you'll be redirected to Login.
-
Login: This page has a 'Login' button. You can log in using the following credentials:
username: test@netlify.com
password: testing - NetlifyCMS: This link goes to /admin/, the usual path for Netlify CMS. Logging in will give you access to the CMS admin UI, but since this is just a login demo, it doesn't actually have any editing capabilities.
The Netlify _redirects
file that I'm using on this site contains:
/testauth/* 200! Role=admin
/testauth/ /testlogin 302
There's some JavaScript on the Test Login page that checks to see if the JWT has expired, and if so, it logs you out of Identity, and prompts you to log back in. This is not done by default with Identity right now. Identity sessions last longer than JWT sessions.
You can find all of the code for this site in the public repo at https://github.com/futuregerald/netlify_identity_example