mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 20:55:57 +03:00
[GH-ISSUE #189] logged or not? #113
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sourov2008 on GitHub (Feb 23, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/189
`
The scenario is i want to set a button and the text of the button will change depends on user Authenticated or Not .
If someone already authenticated button text will set Disconnect/Logged out Or Authenticate Here .
How can i checked is user already Authenticated or Not .
@phimage commented on GitHub (Feb 23, 2016):
⚠️ don't share in github your consumer key and secret (secret means secret), I edit your message...
A user is not disconnected or logged... You have a token, valid or not, or you have not a token
So store the token in
successcallback, you are loggedno token you are not logged
then to know if token always valid you must do an api request and see if success or failed
@sourov2008 commented on GitHub (Feb 23, 2016):
Thank You :)
How Long token will alive ?
@phimage commented on GitHub (Feb 23, 2016):
depending on the provider, here fitbit, and sometimes when requesting authorization you can specify the token duration
in
successhandler there isparametersand sometimes expiration time is defined in this dictionarybut token could also be invalidated, exception must be handled
more info here https://github.com/OAuthSwift/OAuthSwift/wiki/OAuth-2.0-Token-Expiration
you can close issue if no more question