Skip to content

Implement authAction on SupaEmailAuth #95

Closed
@cledoux95

Description

@cledoux95

Feature request

Expose callback and state injection into SupaEmailAuth similar to PhoneSignUp and PhoneSignIn.

Currently, SupaEmailAuth does not implement a way to expose the current internal state to other widgets (parents/siblings). A simple yet compelling reason to implement this is to allow for dynamically changing the AppBar label of the example page from "Sign In" to "Sign Up" when the SupaAuthAction changes from "signIn" to "signUp":

...
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: appBar(title: Text(isSigningIn ? 'Sign In' : 'Sign Up'))
...

This also allows splitting Sign In and Sign Up into two pages for finer grained control over the auth/account creation flow. This is already implemented in PhoneSignUp and PhoneSignIn.

Describe alternatives you've considered

Other than forking the repo and implementing it myself, there isn't an external workaround I see here as _isSigningIn is an internal variable to the SupaEmailAuth state.

Happy to discuss and refine the request if there is anything in need of clarification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions