You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background: for non-HTTP protocols that use GTMAppAuth, e.g. SMTP->GMail, the GTMAppAuth method authorizeRequest: is not called, because it requires an HTTP-request as input. Instead, the access token is accessed directly via .authState.lastTokenResponse.accessToken and used in whatever payload (ie. SMTP).
Issue: the only way I see the accessToken getting refreshed using the refreshToken is if authorizeRequest: is called. This necessitates calling authorizeRequest: with a dummy HTTP-based NSMutableURLRequest, which is non-obvious (see #44 for at least one instance of someone getting snarled by this other than me), and feels weird.
Suggestion: either add a new method like refreshAccessTokenIfNeeded which will either no-op or refresh the accessToken if needed
Thanks.
The text was updated successfully, but these errors were encountered:
Hello! This library is an adapter for using AppAuth with GTM’s session fetcher. The functionality you’re looking for already exists in AppAuth. It sounds like maybe you don’t need or want this library.
Background: for non-HTTP protocols that use GTMAppAuth, e.g. SMTP->GMail, the GTMAppAuth method
authorizeRequest:
is not called, because it requires an HTTP-request as input. Instead, the access token is accessed directly via.authState.lastTokenResponse.accessToken
and used in whatever payload (ie. SMTP).Issue: the only way I see the
accessToken
getting refreshed using therefreshToken
is ifauthorizeRequest:
is called. This necessitates callingauthorizeRequest:
with a dummy HTTP-basedNSMutableURLRequest
, which is non-obvious (see #44 for at least one instance of someone getting snarled by this other than me), and feels weird.Suggestion: either add a new method like
refreshAccessTokenIfNeeded
which will either no-op or refresh theaccessToken
if neededThanks.
The text was updated successfully, but these errors were encountered: