You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am new at making Windows desktop apps, and this was really helpful in getting OAuth working. Thanks for your hard work!
I am using Supabase for authentication, and as someone pointed out in a different thread, the state wasn't propagated so it wasn't able to resolve the taskId & applicationId. My understanding is that when the WebAuthenticator opens the browser, it tracks the process that opened it with a task ID, and later when the browser redirects back to the app, the app would have a reference the task so that it can continue with the sign-in.
What I ended up doing was to fork the WebAuthenticator, and to track the application ID, i used a hard-coded key with AppInstance.FindOrRegisterForKey("main") in CheckOAuthRedirectionActivation. Instead of having multiple tasks, I also hard-coded the taskId key.
This is just a suggestion, but could WinUIEx be simplified similarly so that you don't need to propagate the state in the URL? I can understand needing to cancel tasks, but it wouldn't make sense for one user to try to sign-in multiple times simultaneously.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I am new at making Windows desktop apps, and this was really helpful in getting OAuth working. Thanks for your hard work!
I am using Supabase for authentication, and as someone pointed out in a different thread, the state wasn't propagated so it wasn't able to resolve the taskId & applicationId. My understanding is that when the WebAuthenticator opens the browser, it tracks the process that opened it with a task ID, and later when the browser redirects back to the app, the app would have a reference the task so that it can continue with the sign-in.
What I ended up doing was to fork the WebAuthenticator, and to track the application ID, i used a hard-coded key with
AppInstance.FindOrRegisterForKey("main")
inCheckOAuthRedirectionActivation
. Instead of having multiple tasks, I also hard-coded the taskId key.This is just a suggestion, but could WinUIEx be simplified similarly so that you don't need to propagate the state in the URL? I can understand needing to cancel tasks, but it wouldn't make sense for one user to try to sign-in multiple times simultaneously.
Beta Was this translation helpful? Give feedback.
All reactions