Could you show some code on this one? I am having quite a time trying to configure local storage to work with the token.
let local: Storage = new Storage();
export function getAuthHttp(http: Http, options: RequestOptions) {
return new AuthHttp(new AuthConfig({
tokenName: 'id_token',
headerPrefix: 'JWT',
tokenGetter: (() => local.get('id_token')),
globalHeaders: [{'Content-Type':'application/json'}],
}), http, options);
}
When I make any authHttp request, I get a token.split is not a function error. I am thinking its because the tokenGetter cannot handle the promise returned by local.get()
EDIT: I got this to work with localStorage.getItem() the window global objects use of local storage.