supabase-community/supabase-csharp

Gotrue does not currently support PKCE flow for `ResetPasswordForEmail`

acupofjose opened this issue · 0 comments

Discussed in #111

Originally posted by makgahlela September 30, 2023
how to get the app to detect type=recovery in the fragment of the url below and display a password reset form to the user using supabase c# in "WPF" or .net MAUI ( after the user have clicked the 'reset password' in the email)
https://www.domainName.com/#access_token=........&expires_at=1696000393&expires_in=9600&refresh_token=S2158752dhjjjj77niUA&token_type=bearer&type=recovery
ResettingPassword

Lines in the Gotrue-js client:

Source: https://github.com/supabase/gotrue-js/blob/4b6ec587f3011e6ef9c9ed1510050688410bd8f0/src/GoTrueClient.ts#L1529-L1534

if (this.flowType === 'pkce') {
      const codeVerifier = generatePKCEVerifier()
      await setItemAsync(this.storage, `${this.storageKey}-code-verifier`, codeVerifier)
      codeChallenge = await generatePKCEChallenge(codeVerifier)
      codeChallengeMethod = codeVerifier === codeChallenge ? 'plain' : 's256'
}