I created a flutter/desktop app where I want to create a oauth2 login with a microsoft account, but I get an "error" so that I can login in a browser but the "success" is only in the browser and not in the desktop app... can someone tell me how I need to create the login process in flutter so it works on desktop/android/web etc.?
Summary
Developers faced chaos with Microsoft login errors on their web and Windows platforms in their self-hosted VPS, while cloud deployment worked. Even after various attempts and reinstalls, the issue persisted with login failures and error 500.
The solution that eventually worked was enabling Access Tokens and ID Tokens in Azure authentication settings, setting appwrite to ports 80/443, and utilizing the success parameter in the Flutter function for OAuth2 sessions with Microsoft. This setup enabled successful logins without errors.
hmm so what could be the problem? it is like a 50/50 it works 😄
Kuromory
Rank 2: Process
Jun 5, 2024, 06:59
@D5 do you have an Idea why I get this error?
D5
Moderator
Jun 5, 2024, 10:57
When do you get this? Do you have or can find some replication pattern or steps?
Kuromory
Rank 2: Process
Jun 5, 2024, 13:02
not really, just when I sucessfully login in Microsoft and it redirects to appwrite...
Kuromory
Rank 2: Process
Jun 5, 2024, 14:29
@D5 I really don't know what is wrong with my appwrite... now I also can't login with just email/password...
error is:
flutter: AppwriteException: general_unauthorized_scope, User (role: guests) missing scope (account) (401)
Kuromory
Rank 2: Process
Jun 5, 2024, 14:29
I event totally reinstalled appwrite but still have this problem...
D5
Moderator
Jun 5, 2024, 14:30
That error means that you're logged out...
Kuromory
Rank 2: Process
Jun 5, 2024, 14:32
yeah, but I get this after ```dart
// works
await _account.createEmailPasswordSession(
email: event.email,
password: event.password,
);
// throws error
final user = await _account.get();
Kuromory
Rank 2: Process
Jun 5, 2024, 14:39
@D5 I mean it worked like for weeks now and just today it does not work anymore? 😄
D5
Moderator
Jun 5, 2024, 14:41
Because you deleted your appwrite instance?
Kuromory
Rank 2: Process
Jun 5, 2024, 14:41
no, I deleted it because I thought that would fix it... just reinstalled everything...
Kuromory
Rank 2: Process
Jun 5, 2024, 14:42
I mean with cloud it works... just not with my localhost... I even changed the ports to 80/443...
Kuromory
Rank 2: Process
Jun 5, 2024, 14:44
@D5 should i run the update form 1.5.5 to 1.5.7? it might helps? 🤷
D5
Moderator
Jun 5, 2024, 14:59
It could. However It think it's because of the domain
D5
Moderator
Jun 5, 2024, 14:59
I'm self-hosting in a cheap VPS and it works like in cloud
Kuromory
Rank 2: Process
Jun 5, 2024, 14:59
@D5 okey upgraded it but did not help but I found out now we are in total chaos 😄
on web:
email/password login works
microsoft login does NOT work (error 500)
on Desktop (Windows)