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
The interface for signInSuccessWithAuthResult callback currently is set to boolean at line 26 of types/index.d.ts.
As a result, typescript throws: Type 'Promise' is not assignable to type 'boolean' if the callback function is an async function.
Steps to reproduce:
set the uiConfig.callbacks.signInSuccessWithAuthResult to an async function
Hi @emwadde, the types in types/index.d.ts are correct in this case - FirebaseUI doesn't expect a function that returns a promise that resolves to a boolean, it expects a function that returns a boolean (docs).
This would be a breaking change in FirebaseUI, so I'll leave it open as a feature request. If you'd like to provide more context on your use case (seems like you might be trying to get the JWT for a custom auth integration?), or if others would like to chime in, it would give us a better idea about whether we should prioritize this change.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
The interface for
signInSuccessWithAuthResult
callback currently is set toboolean
at line 26 of types/index.d.ts.As a result, typescript throws: Type 'Promise' is not assignable to type 'boolean' if the callback function is an async function.
Steps to reproduce:
set the
uiConfig.callbacks.signInSuccessWithAuthResult
to an async functionRelevant Code:
Workaround/Fix:
The issue is resolved by updating the Callback interface to include
Promise<boolean>
as a type forsignInSuccessWithAuthResult
The text was updated successfully, but these errors were encountered: