twitter_login icon indicating copy to clipboard operation
twitter_login copied to clipboard

this plugin cannot use the Firebase default callback URL.

Open imeDevelopers opened this issue 2 years ago • 15 comments

This sentence is killing your package.

and actually It works normally!

Go TO: https://developer.twitter.com/en/portal/projects add this callback: https://<YOUR FIREBASE APP ID>.firebaseapp.com/__/auth/handler to your app info section

GO TO: https://console.firebase.google.com/project/<YOUR FIREBASE APP ID>/authentication/providers

Press on: Add new provider Select Twitter and Make sure you add apiKey and apiSecretKey

AndroidManifest.xml:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="<YOUR FIREBASE APP ID>.firebaseapp.com" android:pathPrefix="/__/auth/handler"/>
</intent-filter>

then use the plugin:

await TwitterLogin(
apiKey:'YOUR API KEY',
apiSecretKey:'YOUR API SECRET KEY',
redirectURI:'https://<YOUR FIREBASE APP ID>.firebaseapp.com/__/auth/handler',
).login().then((res)async{
await FirebaseAuth.instance.signInWithCredential(TwitterAuthProvider.credential(accessToken: res.authToken!, secret: res.authTokenSecret!)).then((value){
});
});

imeDevelopers avatar Jan 15 '23 01:01 imeDevelopers

Thanks. I will check this out.

0maru avatar Mar 22 '23 02:03 0maru

I did the same but it still gives an error

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

image

arslanrazacrew avatar May 04 '23 07:05 arslanrazacrew

Any solution yet ?

MehmetKaranlik avatar May 23 '23 09:05 MehmetKaranlik

Not yet

arslanrazacrew avatar May 23 '23 10:05 arslanrazacrew

I have this problem too

ParhaMDeF avatar May 24 '23 10:05 ParhaMDeF

Any update ?

mootp avatar Aug 01 '23 03:08 mootp

Sorry it took so long. No update on this.

The error you see after redirecting to xxx.firebaseapp.com/__/auth/handler is not related to this plugin. Because this plugin uses OAuth 2.0, the only time a browser needs to be open is for the user to sign in to their Twitter account.

After signing in to a Twitter account, the user is redirected to the URL specified in redirectURL, and the authToken and authTokenSecret are obtained from the query parameter of that URL, and the redirection destination is irrelevant.

If it does not work, set a different URL. If you have a Firebase project, creating a page for the redirect will work.

For example xxx.firebaseapp.com/signin/redirect/twitter/ The page would work with minimal HTML markup. I will create a sample project when I have time.

I am not good at English. If the explanation is difficult to understand, please contact me so that I can supplement it.

0maru avatar Aug 07 '23 15:08 0maru

How can this be solved? The problem still exists.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

I did the same but it still gives an error

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

image

Hello, have you resolved this issue? I can log in using the official method provided, but I can't log out.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

This sentence is killing your package.

and actually It works normally!

Go TO: https://developer.twitter.com/en/portal/projects add this callback: https://<YOUR FIREBASE APP ID>.firebaseapp.com/__/auth/handler to your app info section

GO TO: https://console.firebase.google.com/project/<YOUR FIREBASE APP ID>/authentication/providers

Press on: Add new provider Select Twitter and Make sure you add apiKey and apiSecretKey

AndroidManifest.xml:

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="<YOUR FIREBASE APP ID>.firebaseapp.com" android:pathPrefix="/__/auth/handler"/>
</intent-filter>

then use the plugin:

await TwitterLogin(
apiKey:'YOUR API KEY',
apiSecretKey:'YOUR API SECRET KEY',
redirectURI:'https://<YOUR FIREBASE APP ID>.firebaseapp.com/__/auth/handler',
).login().then((res)async{
await FirebaseAuth.instance.signInWithCredential(TwitterAuthProvider.credential(accessToken: res.authToken!, secret: res.authTokenSecret!)).then((value){
});
});

Hello, have you resolved this issue? I can log in using the official method provided, but I can't log out.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

Any solution yet ?

Hello, have you resolved this issue? I can log in using the official method provided, but I can't log out.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

Not yet

Hello, have you resolved this issue? I can log in using the official method provided, but I can't log out.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

Any update ?

Hello, have you resolved this issue? I can log in using the official method provided, but I can't log out.

git00000000001 avatar Nov 16 '23 01:11 git00000000001

Unable to process request due to missing initial state. This may happen if browser sessionStorage is inaccessible or accidentally cleared. Some specific scenarios are - 1) Using IDP-Initiated SAML SSO. 2) Using signInWithRedirect in a storage-partitioned browser environment please suggest someone how i will that issue

Ashfaque-231219 avatar Feb 10 '24 11:02 Ashfaque-231219

anyone having any. suggestion please let me know

Ashfaque-231219 avatar Feb 12 '24 05:02 Ashfaque-231219