benbaran / adal-angular4

Angular 4/5/6/7 ADAL Wrapper
MIT License
86 stars 104 forks source link

How to get refresh token using aquiretoken function ? #102

Open sandipbhavsar opened 5 years ago

sandipbhavsar commented 5 years ago

I am using "adal-angular4": "3.0.16" version.

Here is my configuration ::

private config = {
    tenant: environment.appId,     // tenantId.
    clientId: environment.clientId,
    redirectUri: environment.origin + '/auth-callback', // callback URI.
    postLogoutRedirectUri: environment.origin,
    cacheLocation: 'localStorage',
};

What I need to pass to this.adalService.acquireToken(resource) function as a resource ? Is auto-renewal option available ?

chintandbhatt-zz commented 5 years ago

If you are using implicit-flow than you just need to pass your environment.clientId.

sandipbhavsar commented 5 years ago

@chintandbhatt it will be helpfull if you can share sample

geerzo commented 5 years ago

You shouldn't have to call that method at all if you are using the interceptor. Can you share your example?