mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #432] How to maintain session with OAuthSwift lib #280
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#280
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 @Rupesh1234fbbf on GitHub (Feb 3, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/432
I am using OAuthSwift lib to call web services. We are using OAuth 1 at server side for authentication. But every time I call services it creates a new session at server side. by using Cookies Jar, my android app able to maintain session and no new session is created at server for same. But this not a case in IOS. The Code I tried is as follows
let oauthswift = OAuth1Swift(
consumerKey:"1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
consumerSecret:"5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
)
oauthswift.client.credential.oauthToken = "cxxxxxxxxxxxxxxxxxxxxxxxxx"
oauthswift.client.credential.oauthTokenSecret = "xxxxxxxxxxxxxxxxxxxxxxxx"
i also tried to keep the singleton pattern to keep oauthswift object same form to request but not helped. Also tried to set cookies in oAuthSwift Client as follows.
import Foundation
import OAuthSwift
class ClientHelper{
static var oauthswift:OAuth1Swift?
}
}