Follow-up from #1349 (originally fixing #1319).
When flowType is AuthFlowType.pkce (the default) and no asyncStorage is provided, calling getOAuthSignInUrl() or getLinkIdentityUrl() fails late at call time. PR #1349 mitigated this by throwing a descriptive AuthException instead of crashing with a cryptic null check error in release mode.
A better long-term solution is to validate this requirement up front by adding an assert in the constructor of the GoTrue client, so the misconfiguration surfaces immediately rather than only when an affected method is called.
This is a breaking change and is therefore planned for v3.
Originally proposed in #1349 (comment) by @Vinzent03.
Follow-up from #1349 (originally fixing #1319).
When
flowTypeisAuthFlowType.pkce(the default) and noasyncStorageis provided, callinggetOAuthSignInUrl()orgetLinkIdentityUrl()fails late at call time. PR #1349 mitigated this by throwing a descriptiveAuthExceptioninstead of crashing with a cryptic null check error in release mode.A better long-term solution is to validate this requirement up front by adding an assert in the constructor of the GoTrue client, so the misconfiguration surfaces immediately rather than only when an affected method is called.
This is a breaking change and is therefore planned for v3.
Originally proposed in #1349 (comment) by @Vinzent03.