How to get access_token from keycloak server to my authorization component. The authorization url is looking as following:
The callback url is in http://localhost:4200/auth , here is the component:
import { Component, OnInit } from '@angular/core';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'app-auth',
templateUrl: './auth.component.html',
styleUrls: ['./auth.component.scss']
})
export class AuthComponent implements OnInit {
constructor(private route: ActivatedRoute) { }
ngOnInit() {
console.log(this.route.snapshot);
console.log(this.route.snapshot);
}
}
After a successful login, access_token will be returned from keycloak, something like this:
http://localhost:4200/auth#access_token=qwerty123&session_time=123456789
My question is, how to get that to work, and getting the access_token.
location.hash