Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 718 Bytes

File metadata and controls

7 lines (4 loc) · 718 Bytes

OUath 2.0 Authorization Code Flow - Vanilla JS Client

This code collect authorization code from the Keycloak server and then using that authorization code gets the access token and refersh token. Using the access token accesses the resource server which will respond with a list of heroes (As in angular.io heroes example).

Create app-config.js with content as in app-config.js.example and replace values according to your configuration.

I am using https-localhost as the https server. When you are using the PKCE branch, you need an https server for the crypto code to work. In my opinion https-localhost is a pretty good tool for that.