Prebuilt Angular forms

Additional resources

#Setup

Before installing any forms complete the following step:

#Import the Userfront Angular library

Add the Userfront web-components script inside your HTML <head> above any other scripts.

#Angular layout

It is helpful to wrap the web-components in their own standalone angular components. This allows the forms to be placed anywhere in your application.

#Form locations

You can add as many forms as you would like across your application.

To have a working application ensure you have the following forms at their associated paths:

Form nameRedirect path name
Login formAfter-logout path
Password reset formPassword reset path


#Signup form

The signup form will:

Install by copying the code below and pasting it in your application.

#Login form

The login form will:

  • Log in a user
  • Provide the user with access and id tokens
  • Redirect to your After-login path
  • Update the user's lastActiveAt attribute

To handle login links correctly put a login form at your After-logout path.


Install by copying the code below and pasting it in your application.

#Password reset form

The password reset form will:

  • Send a password reset link to the user's email
  • Reset a password

To handle password resets correctly put a password reset form at your Password reset path.


Install by copying the code below and pasting it in your application.

#Logout button

The logout button will:

  • Show a disabled state when not logged in
  • Clear the user's tokens
  • Redirect after logout to your After-logout path

Install by copying the code below and pasting it in your application.