-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make RetrieveToken usable by client packages #354
Comments
Figured out another way to do this in the meantime |
I'm trying to do something similar, what was your way to do it if you can share it? |
Uhhh wow, 5 years ago, I don't really remember 😅 I think I was working on this project at the time, so you may find some hints in this file: https://github.com/mholt/timeliner/blob/cf155164e218ca1ad6ad600152cd2436c88dba43/oauth2.go#L41 -- not 100% sure it worked correctly but I think it did work for me. 🤷♂️ |
Thank you for your response, I've reused existing API and write some
comments about it to my future self.
…On Tue, Jun 6, 2023, 18:28 Matt Holt ***@***.***> wrote:
Reopened #354 <#354>.
—
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACVLV6FX5UREKULX3GUQTXJ5LDLANCNFSM4GLRKGVQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm working on a client that needs to refresh tokens in a special way, so I'm implementing my own
TokenSource
. The strange thing seems to be that, although theTokenSource
interface is exported, I can't actually reuse the provided logic to refresh a token, asretrieveToken
is unexported and it calls an internal-only function:internal.RetrieveToken()
, even though all the parameters are exported values too.oauth2/token.go
Line 154 in c453e0c
I'd like to use either
retrieveToken()
orinternal.RetrieveToken()
as I'm essentially wrapping it differently than the built-in token refresher.Can we potentially export
retrieveToken()
or makeinternal.RetrieveToken()
usable by external packages?The text was updated successfully, but these errors were encountered: