This project demonstrates the use of Auth0's Lock v11 with an embedded login form using Angular and can easily be implemented for your own applications. Auth0 has a nice tutorial on how to integrate Angular with it's own hosted login page; however, there are some circumstances in which the embedded login form is much more convenient. Full tutorials on how to implement this are lacking, but this Auth0 GitHub repo was helpful alongside the official Auth0 Lock for Web documentation.
- Angular v5.2.3
- Bulma CSS Framework v0.62
- Auth0-js v9.2.0
- Auth0-lock v11.2.1
-
Clone this repo
git clone https://github.com/stanleyeosakul/angular-auth0.git -
cdinto the folder of the cloned repo -
Run
yarn installto install dependencies -
Configure your keys file
Shared/keys/keys.js-
From the root directory, create the keys file
touch Shared/keys/keys.ts -
Enter your
clientIDanddomainfrom your client app settings in Auth0 intokeys.tsimport { Auth0 } from '../models/Auth0'; export const AUTH_CONFIG: Auth0 = { clientID: '<your-client-id-goes-here>', domain: '<your-domain-goes-here>', callbackURL: 'http://localhost:4200/loading' };
-
-
Run
ng serve, and navigate tohttp://localhost:4200/
