refresh-token

Axios Interceptor Response Token Refresh API called but getting Token is expired regardless in refreshToken API & lator all APIs

夙愿已清 提交于 2019-12-10 11:59:43
问题 my axios interceptor is:- axios.interceptors.response.use((response, error) => { const originalRequest = response.config; if (response.data.status === 'Token is Expired' && originalRequest.url === '/api/refresh') { this.props.history.push('/logout'); Promise.reject(error); } if (response.data.status === 'Token is Expired' && !originalRequest._retry) { originalRequest._retry = true; const playerToken = localStorage.getItem('accessToken'); return axios .get('/api/refresh', { headers: {

OAUTH2 Refresh Token

ぐ巨炮叔叔 提交于 2019-12-08 05:17:17
问题 I am little confuse of Refresh Token in OAuth2. Like it says access token limit the time window of 1 hour that hacker can use the user credentials and refresh token is long live token which can be use to recreate the access token. I am confused if someone stole the access token from cookie he can also stole the refresh token and can use the refresh token to create new access token as I have ajax request in JQuery (Client Side) NOTE: I have created ajax request to send refresh token on server

OAUTH2 Refresh Token

孤街浪徒 提交于 2019-12-06 15:34:05
I am little confuse of Refresh Token in OAuth2. Like it says access token limit the time window of 1 hour that hacker can use the user credentials and refresh token is long live token which can be use to recreate the access token. I am confused if someone stole the access token from cookie he can also stole the refresh token and can use the refresh token to create new access token as I have ajax request in JQuery (Client Side) NOTE: I have created ajax request to send refresh token on server side I append the Client ID and Secret there with grant type refresh token. I have saved both access

iOS ADAL-Make silent call using refresh token

旧时模样 提交于 2019-12-06 15:04:11
问题 I am using iOS ADAL library version 2.2.6 and receiving refresh token upon successful login. Now I want to make a silent call by using this refresh token. I tried with following method but it fails to return the access token. ADAuthenticationContext *authContext; [authContext acquireTokenSilentWithResource:resourceId clientId:clientId redirectUri:redirectUri userId:strUserID //loggedIn userID completionBlock:^(ADAuthenticationResult *result){ // It alway throws an error //Please call the non

Why are Refresh Tokens considered insecure for an SPA?

你离开我真会死。 提交于 2019-12-04 21:33:42
问题 I was reading the documentation on the Auth0 site regarding Refresh Tokens and SPA, and they state that SPA's should not use Refresh Tokens as they cannot be securely stored in a browser, and instead use Silent Authentication instead to retrieve new Access Tokens. A Single Page Application (normally implementing Implicit Grant) should not under any circumstances get a Refresh Token. The reason for that is the sensitivity of this piece of information. You can think of it as user credentials,

iOS ADAL-Make silent call using refresh token

会有一股神秘感。 提交于 2019-12-04 19:33:13
I am using iOS ADAL library version 2.2.6 and receiving refresh token upon successful login. Now I want to make a silent call by using this refresh token. I tried with following method but it fails to return the access token. ADAuthenticationContext *authContext; [authContext acquireTokenSilentWithResource:resourceId clientId:clientId redirectUri:redirectUri userId:strUserID //loggedIn userID completionBlock:^(ADAuthenticationResult *result){ // It alway throws an error //Please call the non-silent acquireTokenWithResource methods. if(result.error){ ADAuthenticationError *error = nil;

how to refresh the access token using custom http in angular 2?

孤者浪人 提交于 2019-12-03 15:19:46
问题 I am using token based authentication in my application. My backend is developed using restful service(spring).The backend code is very well generating the required the access token and refresh tokens with timelines, So I have overidden the http class with following: export class customHttp extends Http { headers: Headers = new Headers({ 'Something': 'Something' }); options1: RequestOptions = new RequestOptions({ headers: this.headers }); private refreshTokenUrl = AppSettings.REFRESH_TOKEN

Why are Refresh Tokens considered insecure for an SPA?

孤者浪人 提交于 2019-12-03 14:09:36
I was reading the documentation on the Auth0 site regarding Refresh Tokens and SPA , and they state that SPA's should not use Refresh Tokens as they cannot be securely stored in a browser, and instead use Silent Authentication instead to retrieve new Access Tokens. A Single Page Application (normally implementing Implicit Grant) should not under any circumstances get a Refresh Token. The reason for that is the sensitivity of this piece of information. You can think of it as user credentials, since a Refresh Token allows a user to remain authenticated essentially forever. Therefore you cannot

How do I use oauth2 and refresh tokens with the google api?

Deadly 提交于 2019-12-03 12:47:43
问题 So I just spent the last few days trying to figure this out and am asking this question so that I can answer it for other people who are having problems. First, the google documentation is TERRIBLE and uses different oauth2 libraries depending on which of the many google API examples you are looking at. It is often self-contradictory and sometimes straight up has code in it that doesn't work. Oh well. so my questions were basically: how do I use the google api libraries to have my users grant

how to refresh the access token using custom http in angular 2?

喜你入骨 提交于 2019-12-03 04:03:05
I am using token based authentication in my application. My backend is developed using restful service(spring).The backend code is very well generating the required the access token and refresh tokens with timelines, So I have overidden the http class with following: export class customHttp extends Http { headers: Headers = new Headers({ 'Something': 'Something' }); options1: RequestOptions = new RequestOptions({ headers: this.headers }); private refreshTokenUrl = AppSettings.REFRESH_TOKEN_URL; constructor(backend: ConnectionBackend, defaultOptions: RequestOptions,private refresh