An open API service indexing awesome lists of open source software.

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)

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.