
I build a tiny little App that lets you login with your Google or Discord Account and greets you with your username if logged in. Code is here: https://github.com/theLazyPragmatic/oauthtest
so, I haven't figured out Riverpod yet, so you have to reload the app in order to see the greeting. This issue is not about that (although I am more than happy if someone shows me whats wrong). BUT: Redirecting from google signin does work as expected, redirecting from discord does not. Both providers received the same redirect-uri from the appwrite console during setup. Discord also creates a user / a session in appwrite - after authorizing, the browser gets briefly redirected to cloud.appwrite.io, but then immediately back to discord.

@D5 thanks for looking into it.

After redirect, you can route. You don't need to use riverpod

Just material route

...But I want to use riverpod and I don't want a new route, I want this page to be rebuilt. Routing back to the page after login/logout feels like a clever hack, but a cheat nontheless.. (and it does not work...)
The core problem, however, is that - for Discord - there is no redirect. Browser: Discord.com -> "Authorize" -> cloud.appwrite.io -> Discord.com -> "Authorize" etc. At least google redirects back (but does not rebuild page.)

After the GetX experience, I recommend sticking to native/flutter parts if possible. Using riverpod for displaying data is great and I do that. However in your case, you should route after login to a different page instead of changing/hiding the existing widget

Hmm I think all the ouath providers redirect back to the app, right?

Docs say they should. MyApp says they don't.

But only for Discord? Google returns back to the app?

Yes.
Recommended threads
- Upload file
i got this error when try upload file (.Net). I use this line to check my buucket and its all right var buckets = await appWriterInit.Storage.List...
- Auth Error
"use client"; import { useEffect } from "react"; import { getSessionCookie } from "@/actions/auth"; import { createBrowserSessionClient } from "@/lib/appwrite-...
- Prevent modifying specific attributes
How do I prevent user to only to be able to modify some of the attributes. Document level security gives full access to update whole document, what are the wor...
