[GH-ISSUE #281] Credentials are not cached #167

Closed
opened 2026-03-03 16:46:19 +03:00 by kerem · 6 comments
Owner

Originally created by @ivanruizscm on GitHub (Sep 27, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/281

I have to call oauthswift.authorizeWithCallbackURL everytime before make an api call, so the users is redirected to the google allow access page everytime i instantiate a new OAuth2Swift object

Originally created by @ivanruizscm on GitHub (Sep 27, 2016). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/281 I have to call oauthswift.authorizeWithCallbackURL everytime before make an api call, so the users is redirected to the google allow access page everytime i instantiate a new OAuth2Swift object - **OS targeted (with version) 10 - **OAuth provider: Google - **OAuthSwift version: https://github.com/skedgo/OAuthSwift/ in swift3 branch
kerem 2026-03-03 16:46:19 +03:00
Author
Owner

@phimage commented on GitHub (Sep 27, 2016):

could you edit your comment and fill the template

<!-- gh-comment-id:249836898 --> @phimage commented on GitHub (Sep 27, 2016): could you edit your comment and fill the template
Author
Owner

@phimage commented on GitHub (Sep 27, 2016):

please use master branch from now (swift 3 compatible)
function has been renamed to oauthswift.authorize(withCallbackURL

why did you create a new OAuth2Swift object, you must retain it and use it again and again
the credential is stored into it (oauthswift.client.credential)

<!-- gh-comment-id:249847928 --> @phimage commented on GitHub (Sep 27, 2016): please use master branch from now (swift 3 compatible) function has been renamed to `oauthswift.authorize(withCallbackURL` why did you create a new OAuth2Swift object, you must retain it and use it again and again the credential is stored into it (`oauthswift.client.credential`)
Author
Owner

@ivanruizscm commented on GitHub (Sep 27, 2016):

and if i leave the app should i ask for permission again?

<!-- gh-comment-id:249854159 --> @ivanruizscm commented on GitHub (Sep 27, 2016): and if i leave the app should i ask for permission again?
Author
Owner

@ivanruizscm commented on GitHub (Sep 27, 2016):

is this object serializable?

<!-- gh-comment-id:249854191 --> @ivanruizscm commented on GitHub (Sep 27, 2016): is this object serializable?
Author
Owner

@ivanruizscm commented on GitHub (Sep 27, 2016):

maybe this is what i was looking for -> https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential

<!-- gh-comment-id:249858486 --> @ivanruizscm commented on GitHub (Sep 27, 2016): maybe this is what i was looking for -> https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential
Author
Owner

@phimage commented on GitHub (Sep 28, 2016):

yes this is the good page for that

<!-- gh-comment-id:250073446 --> @phimage commented on GitHub (Sep 28, 2016): yes this is the good page for that
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#167
No description provided.