[GH-ISSUE #478] How to save authorization? #314

Closed
opened 2026-03-03 16:47:37 +03:00 by kerem · 2 comments
Owner

Originally created by @JetForMe on GitHub (Jul 10, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/478

Description:

I'm trying to save the returned OAuthSwiftCredential, and I'm able to do that, so that on subsequent executions my app doesn't force the user to re-auth, but I can't see any way to re-create the OAuth1Swift object with that stored credential.

OAuth Provider? (Twitter, Github, ..):

Twitter

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • Carthage
  • CocoaPods
  • Manually

Library version:

  • head
  • v1.2.1
  • v1.2 (Swift 4.0)
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)
    1.2.2

Xcode version:

  • 9.3 (Swift 4.1)
  • 9.0 (Swift 4.0)
  • 9.0 (Swift 3.2)
  • 8.x (Swift 3.x)
  • 8.0 (Swift 2.3)
  • 7.3.1
  • other: (Please fill in the version you are using.)

9.4.1, Swift

  • objective c
Originally created by @JetForMe on GitHub (Jul 10, 2018). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/478 ### Description: I'm trying to save the returned `OAuthSwiftCredential`, and I'm able to do that, so that on subsequent executions my app doesn't force the user to re-auth, but I can't see any way to re-create the `OAuth1Swift` object with that stored credential. ### OAuth Provider? (Twitter, Github, ..): Twitter ### OAuth Version: - [x] Version 1 - [ ] Version 2 ### OS (Please fill the version) : - [ ] iOS : - [x] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [ ] CocoaPods - [x] Manually ### Library version: - [ ] head - [ ] v1.2.1 - [ ] v1.2 (Swift 4.0) - [ ] v1.0.0 - [ ] v0.6 - [x] other: (Please fill in the version you are using.) 1.2.2 ### Xcode version: - [ ] 9.3 (Swift 4.1) - [ ] 9.0 (Swift 4.0) - [ ] 9.0 (Swift 3.2) - [ ] 8.x (Swift 3.x) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [x] other: (Please fill in the version you are using.) 9.4.1, Swift - [ ] objective c
kerem closed this issue 2026-03-03 16:47:38 +03:00
Author
Owner

@phimage commented on GitHub (Jul 10, 2018):

credential is not settable (I think I must change that but I must check some pointts)
but you can edit the fields of the credential in oauthswift object
https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential#inject-loaded-token

<!-- gh-comment-id:403744503 --> @phimage commented on GitHub (Jul 10, 2018): credential is not settable (I think I must change that but I must check some pointts) but you can edit the fields of the credential in oauthswift object https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential#inject-loaded-token
Author
Owner

@JetForMe commented on GitHub (Jul 10, 2018):

That seems to work, thank you. I think it would be good if I could just assign a Credential to an OAuth object. Thanks!

<!-- gh-comment-id:403962444 --> @JetForMe commented on GitHub (Jul 10, 2018): That seems to work, thank you. I think it would be good if I could just assign a Credential to an OAuth object. Thanks!
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#314
No description provided.