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
{{ message }}
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
Hello. Any chance you can put together a brief user guide? I'm able to get to the point where I receive the 'code' in the callback URL, but I'm not 100% sure what to do with it :) and/or how the access token/refresh token is persisted and used. Great work by the way!
The text was updated successfully, but these errors were encountered:
Thank you! I've been meaning to put together a wiki page but I haven't gotten around to it yet.
The library tries to take care of as much of the authentication process as possible. For example, it'll bootstrap an https server when it determines it is necessary to authenticate through TD's OAuth2 service, it'll refresh the token automatically when a 401 is received and it will of course update its config every time a new token is issued.
The most important part is persisting the configuration itself. The key APIs for this are .on('token', callback), which notifies when a new token is issued, and .login(), which checks if the token is good to go, if it needs to be refreshed or if it's time to bootstrap OAuth2 authentication.
Until I get around to writing an official guide, here's how I use it:
Hello. Any chance you can put together a brief user guide? I'm able to get to the point where I receive the 'code' in the callback URL, but I'm not 100% sure what to do with it :) and/or how the access token/refresh token is persisted and used. Great work by the way!
The text was updated successfully, but these errors were encountered: