Is there way to implement the login and sign_up page in a client app?
So far I’ve tried:
- Copying the universal login page in one of our client apps- a rails app and I used the “auth0-lock” npm package, but a couple of problems arise. The main one being CORS policy errors:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://TENANT_NAME.auth0.com/usernamepassword/challenge. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 404
and when attempting to login:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://TENANT_NAME.auth0.com/co/authenticate. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 403
I understand why that is, but I was wondering if there is a way for us to setup the CORS policy for those resources, because I couldn’t find it anywhere in the dashboard.
- Another thing we tried is to build our own login/sign_up page and use the management API to create the users. That works great for the sign_up page, but is there a way for us to be able to create a session for a user via the management API?
Reasoning:
Implementing the login and sign_up pages in a client app would make it easier for us to maintain them. So far we’ve got two tenants- one for the development and test environments and one for the production environment. When we want to make a change to the login page we sometimes update only one of the apps instead of both of them. Having it in a single repository, would make it easier for us to keep them both synchronized.
Right now we’re trying to change the way the login and sign up pages look to confine better to our product vision and it would look a lot different than what is provided as a default. How should we go about this? Adding a style tag to the universal login pages and trying to keep it up to date between the two apps, would be very cumbersome.