Giter Club home page Giter Club logo

Comments (26)

ScottishRoss avatar ScottishRoss commented on July 23, 2024 1

Of course, have fun my friend!

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Can I take this issue? @ScottishRoss

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

@ScottishRoss, Twitter Developers project is asking me about the following details :
Website URL
Callback URL
Terms of Service
Privacy Policy

Could you comment the websites of the above required fields?

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

Website: https://www.littlevictories.app/
Privacy Policy: https://www.littlevictories.app/privacy-policy

I have applied for a Twitter Dev account to get the final URLs, though I'm not sure what the TOS URL is. When I get approved I will let you know.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

I think without the TOS we cannot access the email of the users associated with their Twitter account.
How much time will it take till we get the TOS URL?

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

I'm not sure I can say. Having a quick look around, it may take a few days for approval. I was unaware of this step otherwise I would have done it before.

Can you give me a link to the documentation regarding the TOS URL? If that's something I have to generate I may be able to get it done faster, but the Callback URL would still be blocked until this approval.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Actually, I have no idea how this TOS URL thing works. I didn't come across any documentation that says how to generate it. If I find one I'll let you know.

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

Thanks. If my dev account gets approved I'll have a look there. Unfortunately, there's not much more I can help you with until that happens. You can try and create one yourself and see if that gets approved first. Those details can be left out of the PR and I can add them in later.

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

Callback URL: https://little-victories-b2c60.firebaseapp.com/__/auth/handler.

TOS is a problem though. It looks like Twitter requires me to have TOS on how I use their email address, but this is a legal document that would be quite a headache to get. I am contacting Twitter to ask for support, and I've reached elsewhere.

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

TOS Link: https://www.littlevictories.app/terms-of-service

It will suffice for now. I think that's everything you need, @sudo-saksham?

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Yeah, I guess there's everything that's needed. If anything else is required I'll inform.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Hey, I've enabled the Twitter login and added an apt button to login with twitter, but as I'm clicking to authorize the application I'm getting the following error :

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

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Ahh, I came to know that we need to have a custom domain for twitter_login dependency to work. How do I resolve it? I found this resource but couldn't understand it properly. Can you help me with this? @ScottishRoss

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

@sudo-saksham That link/image seems to be broken. Can you share again?

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

Interesting. According to a Firebase issue a lot of people are encountering this, and have been for months, but with no solution.

Though specifically to Twitter Auth this stack overflow answer may help?

https://stackoverflow.com/questions/65657437/flutter-twitter-auth-error-missing-initialstate

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

After this, the application is crashing. It's like the app starts to build and it shows the splash screen and then suddenly it crashes.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

It shows me the following error and I don't know what went wrong?
I didn't change anything in my AndroidManifest.xml file. Just made that change from Stack Overflow. And, after that even I removed that line, it's just showing me this error and the app builds, the splash screen appears and suddenly the app closes.

Installing build/app/outputs/flutter-apk/app.apk...                 5.5s
E/AndroidRuntime(17415): FATAL EXCEPTION: main
E/AndroidRuntime(17415): Process: com.saksham.littlevictories, PID: 17415
E/AndroidRuntime(17415): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.saksham.littlevictories/com.saksham.littlevictories.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.saksham.littlevictories.MainActivity" on path: DexPathList[[zip file "/data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/lib/arm64, /data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
E/AndroidRuntime(17415):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3348)
E/AndroidRuntime(17415):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3596)
E/AndroidRuntime(17415):        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(17415):        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(17415):        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(17415):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067)
E/AndroidRuntime(17415):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(17415):        at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(17415):        at android.app.ActivityThread.main(ActivityThread.java:7705)
E/AndroidRuntime(17415):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17415):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(17415):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
E/AndroidRuntime(17415): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.saksham.littlevictories.MainActivity" on path: DexPathList[[zip file "/data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/lib/arm64, /data/app/~~wCbGAdzQei-sRdjzYdcDDQ==/com.saksham.littlevictories-A7ykcXcdTcWS6W_2GUSGCQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
E/AndroidRuntime(17415):        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
E/AndroidRuntime(17415):        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(17415):        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(17415):        at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
E/AndroidRuntime(17415):        at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
E/AndroidRuntime(17415):        at android.app.Instrumentation.newActivity(Instrumentation.java:1254)
E/AndroidRuntime(17415):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3336)
E/AndroidRuntime(17415):        ... 11 more

@ScottishRoss

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

So it can't find MainActivity. Make sure that line hasn't been removed from AndroidManifest.xml

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

I'm atttaching my AndoridManifest file. It looks fine to me, but I don't have much experience with handling XML file. As far as I know the MainActivity line is present. Could you confirm? @ScottishRoss
AndroidManifest.txt

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

https://stackoverflow.com/questions/61046199/java-lang-runtimeexception-unable-to-instantiate-activity-in-flutter

Ah, I think I know what the problem might be. If you look at the last answer on this post it will be because this is renamed: com.example.appname

The app will be looking for dev.rhenderson.little_victories, but yours is named com.saksham.littlevictories

image

Your folder structure will need to look like this. Truthfully, this is a bit of a nightmare to do as I've done it once before. Every reference to dev.rhenderson.little_victories will need to be changed to com.saksham.littlevictories, and those changes cannot be included in the PR as it will require me to change it back. It's probably worth keeping it as the default one.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

So, can you share the firebase project with me as I need your google-services.json file and hence there won't be need to change it to com.saksham.littlevictories?

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

Okay, so I changed the package name to dev.rhenderson.little_victories and it worked like magic, but still I'm facing that Unable to instantiate activity error when I use twitter_login package though when I used flutter_twitter_login it worked and authentication is running perfectly, but the problem is that it's not null safe. As of now I have used latter package as it's working.

Now, working on merging the database when there is already a user signed in with same email.
If you have any resource that guides on how to do it would be great.
@ScottishRoss

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

I think there's some code in the google_sign_in auth that might help with that. Though this article has a section for "link multiple providers": https://petercoding.com/firebase/2021/06/06/using-twitter-authentication-with-firebase-in-flutter/#link-multiple-auth-providers

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

I integrated Twitter sign-in and it's working perfectly.
But I'm facing this issue.
Basically, if a user has already logged in with Google then logs out and logs in with Twitter then as we authorize if shows the error account-exists-with-different-credential but doesn't return the credentials of the account that already exists and since I have no information on what the existing account credentials are, therefore I have to ask the user for it's Google sign-in information again (just for the 1st time when the user signs in with Twitter after signing in with Google).

So, do you have any resource which could guide me on how to get the existing account user credentials? Or should I make the PR with the current situation?

from little_victories.

ScottishRoss avatar ScottishRoss commented on July 23, 2024

@sudo-saksham create a PR targetting the TwitterAuth_28OCT21 branch. You've done a lot of work and deserve the Hacktoberfest PR, and we can continue working on it after.

from little_victories.

saksham-gt avatar saksham-gt commented on July 23, 2024

I've made this PR. It has got some merge conflicts. Please review it and let me know if something needs to be changed.

from little_victories.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.