sdk-for-flutter icon indicating copy to clipboard operation
sdk-for-flutter copied to clipboard

[BUG] Converting anonymous account with OAuth2

Open TorstenDittmann opened this issue 2 years ago • 0 comments

When initializing an OAuth2 session, the cookie that would indicates migrating an anonymous account to a full account gets lost in the WebView.

I think one of the possible solution at the moment (that will also work for other clients including Android (kotlin), iOS (swift), as I think Android will have similar problem at the moment)

  1. in the createOAuth2Session endpoint we will receive the cookie from the client,
  2. using that cookie Appwrite will generate some token that will identify the currently active session/user and passing that token around during redirection
  3. so when finally redirected to create actual session, Appwrite can use that token to identify the active session if any

Or similar thing might be done, instead of passing token around during redirection, saving some details temporarily in the DB/or somewhere, that can be used to identify the request and session to make the decision We will have more research and possible solution around it.

TorstenDittmann avatar Aug 11 '21 09:08 TorstenDittmann