https://github.com/ukcoderj/angular-auth0-api
A very simple angular application that calls an API with JWT Token (modded from Auth0 tuts)
https://github.com/ukcoderj/angular-auth0-api
Last synced: about 1 year ago
JSON representation
A very simple angular application that calls an API with JWT Token (modded from Auth0 tuts)
- Host: GitHub
- URL: https://github.com/ukcoderj/angular-auth0-api
- Owner: ukcoderj
- Created: 2020-09-14T10:06:11.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-14T10:17:33.000Z (almost 6 years ago)
- Last Synced: 2024-11-04T14:57:23.077Z (over 1 year ago)
- Language: TypeScript
- Size: 137 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular-Auth0-API
A very simple (bit messy) angular application that calls an API with JWT Token (modded from Auth0 tuts)
------------------------------------------------
## Sample 01 - Login
This sample app demonstrates how to log in, log out, and view profile information of the logged-in user. It uses [auth0-spa-js](https://github.com/auth0/auth0-spa-js).
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.2 (bit out of date now, but it's the same as angular 10+ for this purpose).
## Configuration
The sample needs to be configured with your Auth0 domain and client ID in order to work. Open the file `auth_config.json` and replace the values with those from your Auth0 tenant:
```json
{
"domain": "..auth0.com>",
"clientId": "",
"audience": ""
}
```
## Configuration 2
Update `src\app\api-caller.service.ts` with the protected URL you want to access.
## Running
Use `ng serve` to run.