Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter SignIn - SessionStorage Error #708

Open
5 of 20 tasks
Dave181295 opened this issue Jul 29, 2023 · 3 comments
Open
5 of 20 tasks

Twitter SignIn - SessionStorage Error #708

Dave181295 opened this issue Jul 29, 2023 · 3 comments

Comments

@Dave181295
Copy link

Dave181295 commented Jul 29, 2023

Description:

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

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • CocoaPods
  • Swift Package Manager
  • Manually

Library version:

  • head
  • v2.1.0
  • v2.0.0
  • v1.4.1
  • other: (Please fill in the version you are using.)

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.) 14

  • objective c

Whenever trying to login , the safari opens inApp and then we got the error:

Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared.

Code


 oauthSwift = OAuth1Swift(
            consumerKey:    consumerKey,
            consumerSecret: consumerSecret,
            requestTokenUrl: "https://api.twitter.com/oauth/request_token",
            authorizeUrl:    "https://api.twitter.com/oauth/authorize",
            accessTokenUrl:  "https://api.twitter.com/oauth/access_token"
            
        )
       
        oauthSwift.authorizeURLHandler = SafariURLHandler(viewController: parent, oauthSwift: oauthSwift)
        
view
 .onOpenURL { url  in
                
                if url.host == "oauth" && url.scheme == "twitter" {
                    // Handle Twitter login
                    OAuthSwift.handle(url: url )
                    
                }
@bharatlal087
Copy link

Is there any progress on this issue?

@phimage
Copy link
Member

phimage commented Nov 7, 2023

nope, code provided is not enought, not authorize call etc... this could be your callback url that not matching one defined in twitter app declaration
then maybe twitter go to oauth 2, because missing state is somethings that I see more with this protocol version

@Dave181295
Copy link
Author

nope, code provided is not enought, not authorize call etc... this could be your callback url that not matching one defined in twitter app declaration
then maybe twitter go to oauth 2, because missing state is somethings that I see more with this protocol version

private let callbackURL = "https://appname.firebaseapp.com/__/auth/handler"

the same callbackUrl is applied in twitter dashboard, tried with our custom domain and still getting the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants