Skip to main content

Get User

Abstra's SDK provides the get_user() method, which prompts the user to log in (if not already) and returns an object with the user's email.

tip

Check out the Access Control concepts page to learn more about securing your forms and restricting access to specific users.

info

While editing your project, you can use any email to log in and test the form.

Function definition

def get_user() -> User

# User: { email: str }

Example

import abstra.forms as af

auth_info = af.get_user()
email = auth_info.email

print(f"User email: {email}")