Ok
Here is the function for authorization via OAuth2
It's seem like the value of jetservice_server
is not the same is the value you've entered when you initialized your client
Is this how your client creation looks?
Client client = Client()
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
.setProject('jetservice_server');
But registration via email. works.
Try to run it as follow
account.createOAuth2Session(
provider: 'google',
success: 'appwrite-callback-jetservice_server://',
failure: 'appwrite-callback-jetservice_server://',
)
I think that because you're using a service container the createOAuth2Session
is unable to get your project id to created the success and failure urls
OK thanks! I'm going to try now
There is no change. Same error
OK, I've found the issue your project ID can't contain the underscore _
character if you want to use OAuth2
You can use the dash -
if you want
That mean you'll have to recreate the project or rename it thorough direct access to the MariaDB
You can see more details here https://github.com/ThexXTURBOXx/flutter_web_auth_2#troubleshooting-callbackurlscheme
This is the package on which the OAuth2 login is running on
How to rename a project via MariDB? Is it possible to rename a project via env file? Because this project has already started. We just wanted to add Google and Apple authentication.
It's a bit complex matter You'll have to tunnel to your MariaDB server using something like DataGrip you can see some details here https://discord.com/channels/564160730845151244/1088290647036923976/1088292555688530010 Be sure to backup everything before performing any action.
The changes will require you to change the project id in many places in the database I do recommend to check building some utility and copy all the data to a newly created project
Or can it be renamed via docker-compose.yml?
No, This data is only in the database
I can't even create a new project. I wanted to create a new project in parallel and copy the entire collection from there. Interesting
Weird
Updated the latest version more precisely to version 1.2. On the previous version, I tried to create two or more projects, and everything worked without problems? A new problem has been discovered that should solve it. What a pity
rolled back to version 1.0.3. And in parallel the second project was created
It seems to be more a server-side problem. Maybe the server instance got corrupted
Did you upgrade to 1.1.x, run the migrate commanf and then upgrade to 1.2.x and run the migrate command again?
No I didn't do that
I immediately updated the version from 1.03 to 1.2. And then did the migration
that's probably why you got the error then
And how to update the phone number without a password after logging in via OAuth2? Or is a password required?
https://appwrite.io/docs/client/account?sdk=web-default#accountUpdatePassword. If you still need help, feel free to create a new <#1072905050399191082> post
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...