Your challenge is to combine this app with our Spotify app.
Explore the components of this app and add these to the Spotify app. Have a look below at this project's home page:
Check the auth0.config.ts
file and provide your Auth0 client ID and domain.
Install the npm packages described in the package.json and verify that it works:
# Install the dependencies
npm install
# Run
npm start
The npm start command first compiles the application, then simultaneously re-compiles and runs the lite-server. Both the compiler and the server watch for file changes.
Shut it down manually with Ctrl-C.
You're ready to write your application.
/* ===== ./index.html ===== */
<head>
...
<!-- Auth0 Lock script -->
<script src="http://cdn.auth0.com/js/lock/10.7/lock.min.js"></script>
...
</head>
/* ===== app/auth.service.ts ===== */
@Injectable()
export class Auth {
// Configure Auth0
lock = new Auth0Lock('YOUR_CLIENT_ID', 'YOUR_DOMAIN', {});
constructor() {
// Add callback for lock `authenticated` event
this.lock.on('authenticated', (authResult) => {
localStorage.setItem('id_token', authResult.idToken);
});
}
public login() {
// Call the show method to display the widget.
this.lock.show();
};
...
}
Auth0 helps you to:
- Add authentication with multiple authentication sources, either social like Google, Facebook, Microsoft Account, LinkedIn, GitHub, Twitter, Box, Salesforce, among others, or enterprise identity systems like Windows Azure AD, Google Apps, Active Directory, ADFS or any SAML Identity Provider.
- Add authentication through more traditional username/password databases.
- Add support for linking different user accounts with the same user.
- Support for generating signed JSON Web Tokens to call your APIs and flow the user identity securely.
- Analytics of how, when and where users are logging in.
- Pull data from other sources and add it to the user profile, through JavaScript rules.
- Go to Auth0 and click Sign Up.
- Use Google, GitHub or Microsoft Account to login.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
This project is licensed under the MIT license. See the LICENSE file for more info.