Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Add a manual method to refresh the token for non-HTTP protocol usage #57

Closed
xaphod opened this issue Feb 8, 2018 · 1 comment

Comments

@xaphod
Copy link

xaphod commented Feb 8, 2018

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.

@StevenEWright
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants