angular - auth0: token data appeared in the url and event authenticated did not raise -


i trying login using auth0 angular2 app. code derived auth0 sample. working behavior bit weird.

token data appended url:

http://localhost:4200/#access_token=0zoq3u6ma2tahqnh&id_token=eyj0e...jqd&token_type=bearer

event authenticated did not raise:

@injectable() export class auth0service {    // configure auth0   lock = new auth0lock('i21eajbbpfph...', 'xxx.au.auth0.com', {});    constructor() {     // add callback lock `authenticated` event     this.lock.on("authenticated", (authresult) => {       // use token in authresult getprofile() , save localstorage       this.lock.getprofile(authresult.idtoken, function(error, profile) {         if (error) {           // handle error           return;         }          localstorage.setitem('id_token', authresult.idtoken);         localstorage.setitem('profile', json.stringify(profile));       });     });   } ... 

any idea pls?

locationstrategy , hashlocationstrategy added resolve routing url probblem when refreshing page causes issue auth0 function.

removing them in app.module.ts auth0 function back.

//{provide: locationstrategy, useclass: hashlocationstrategy}, 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -