mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #642] Confused about how credential should be persisted and repopulated. #421
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#421
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 @ashrobo on GitHub (Jan 10, 2021).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/642
Description:
I have the OAuth mechanism working end to end, however I'm confused about how the credentials should be persisted. I'm using NSKeyedArchiver to covert the credentials to data which I'm then storing in the keychain in response to the application being terminated. On re-launch I'm checking if the keychain contains any credentials, if so I'm using NSKeyedUnarchiver to reconstruct the credential object but at this point I'm unable to set the credentials back on the SwiftOAuth Client object as the property is get only?
I want to ensure future calls to startAuthorizedRequest use my persisted credentials rather than asking the user to log in again each time the application is killed, what's the correct way to handle this?
OAuth Provider? (Twitter, Github, ..):
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
11.4 (Swift 5.2)
11.x (Swift 5.1)
10.x (Swift 5.0)
other: (Please fill in the version you are using.) - 12.1
objective c
@phimage commented on GitHub (Apr 2, 2021):
https://github.com/OAuthSwift/OAuthSwift/wiki/Store-credential