refresh-token

How do I access my Firebase Database via HTTP REST API?

本小妞迷上赌 提交于 2019-12-20 08:30:03
问题 Thanks to this answer I am able to connect to Firebase 3 via HTTP REST API and an email/password. Logging in with this API returns an access token that is used to access the Firebase Database. This access token expires after 1 hour. A refresh token is also returned after logging in, which I can use to refresh my access token. Here is what I am doing specifically: Method: POST URL: https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=<my-firebase-api-key> Payload: {

Get refresh token with Azure AD V2.0 (MSAL) and Asp .Net Core 2.0

谁说我不能喝 提交于 2019-12-19 07:09:19
问题 I've got access_token from Azure Ad V2.0 endpoint to call Graph Api. But I have to do some actions in the api on behalf of user. So I need refresh_token to renew my access_token when it'll expire. Is there any way to get Refresh token using MSAL in ASP .Net Core? In microsoft documentaion they're telling it's possible to do by requesting /token endpoint. But I couldn't find how to do it using MSAL. 回答1: MSAL .NET does not expose the refresh token, but rather keeps it internal and handles all

AWS Using refresh token Javascript

倖福魔咒の 提交于 2019-12-14 03:23:30
问题 Are there any examples on how to use the refresh token to get a new idtoken on aws cognito? I´m trying to use http://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html But then, it requires "developer credentials". I think I was able to set that on Cognito following http://docs.aws.amazon.com/cognito/latest/developerguide/developer-authenticated-identities.html#associate-developer-provider Now I don´t know what else do I need to do on my code in

Ionic 2 retrying API call with new access token if unauthorized

人盡茶涼 提交于 2019-12-13 03:55:38
问题 I have an ionic 2 app that uses access tokens to authenticate to an API. If an access token expires, it can be exchanged for a new access token using a refresh token. There is a function handling an API call that returns a promise. If the API call initially succeeds, the promise resolves. If there is a 401 (Unauthorized) error returned, I want to make another API call that uses a refresh token to get a new access token. Then, the original API call should be tried again with the new access

How to use Refresh token of firebase

ぐ巨炮叔叔 提交于 2019-12-12 05:28:56
问题 What is the expiry time of refresh token? Can I get new token if used with refresh token. If yes Is there any time limit for refresh token . 回答1: Firebase Authentication uses two tokens: a long-lived/permanent refresh token that identifies the user. a short-lived ID token that grants the user access to backend services. The refresh token doesn't expire. The ID token by default expires hourly. If you mint a custom token you can set a custom expiration, which can never be longer than an hour.

Facing issue to handle observable with jquery and angular

戏子无情 提交于 2019-12-11 15:51:49
问题 I have requirement where I need to use jquery dataTables in angular 5 application. I am facing issue to refresh the token. Below is the code that I am using to achive this: sendRequest() { const requestObject = { 'url': '/getUsers', 'type': 'GET', 'beforeSend': self.refreshToken(), 'error': function (xhr, error, thrown) { if(xhr.status === 401) { return self.refreshToken().concatMap(() => { self.sendRequest(); }) } } } And below is my code to refresh the token: refreshToken(req, next) { const

Can't refresh access token for Google Calendar API on server side

走远了吗. 提交于 2019-12-11 15:49:11
问题 My client application on iOS authorizes the user and receives the access token and the refresh token and sends it to my server, where it is stored in the database. The server connects to the calendar and get the events. The problem is that the access token is not refreshed in any way using the refresh token and this error is returned: { "error": "unauthorized_client", "error_description": "Unauthorized" } public function sync($token, $expiresIn, $refreshToken, $created) { $client = new Google

Using Google API Refresh Token in Python

耗尽温柔 提交于 2019-12-11 06:10:49
问题 I made a personal use app that just queries my gmail for a certain type of email. The app is successfully running on a pi night and day making requests to the Gmail service every thirty seconds. However every week or so I get this error: messages = gmail.users().messages().list(userId='me').execute() # q='is:unread' File "C:\Users\rexma\Anaconda3\envs\stan_env\lib\site- packages\oauth2client\_helpers.py", line 133, in positional_wrapper return wrapped(*args, **kwargs) File "C:\Users\rexma

Obtaining Refresh Token from lepture/Authlib through Authorization Code

邮差的信 提交于 2019-12-11 02:34:58
问题 I am trying to develop a simple tool that uses Authlib OAuth2 server to get refresh tokens but example server here does not issue a refresh token. When I print the token I get the following: {'access_token': '....', 'scope': 'profile', 'token_type': 'Bearer', 'expires_in': 864000, 'expires_at': 1532191887} The flow is Authorization code as referred here; first I handle the consent part: client_id = '...' client_secret = '.....' scope = '...' session = OAuth2Session(client_id, client_secret,

How to refresh a Google OAuth2 AccessToken

十年热恋 提交于 2019-12-10 20:33:14
问题 I have seen a lot of questions about this with varying answers. Some are for different languages. It is not clear to me the correct way to handle this issue. This is what I have come up with: public bool Init() { UserCredential credential; ClientSecrets secrets = new ClientSecrets() { ClientId = m_ClientID, ClientSecret = m_ClientSecret }; if (!m_LogFilePathSet) return false; try { credential = GoogleWebAuthorizationBroker.AuthorizeAsync( secrets, m_Scopes, "user", CancellationToken.None, new