Authentication and Onboarding

What this section is for

The authentication and onboarding system provides secure access to the admin panel and automatic workspace setup for new users with creation of personalized AI agents based on their website analysis.

System login process

Sign in page (/signin)

Two-step login process for enhanced security and convenience:

Step 1: Email input

  1. Enter email address in the "Email" field
  2. Click "Continue with Email" to proceed to the second step
  3. Alternative login methods:
    • "Continue with Google" — login via Google OAuth
    • Option to add other social networks

Step 2: Password input

  1. Email is displayed with edit option ("Edit" button)
  2. Enter password in the corresponding field
  3. Click "Sign In" to complete login
  4. Automatic redirect to the page you came from (if returnUrl exists)

Password recovery

Available on the login page:

  • "Forgot Password?" link leads to recovery page
  • Process via email with temporary code
  • Option to create a new password

New account registration

Registration page (/signup)

Step 1: Data entry

Required fields:

  • Email — address for login and communication
  • Password — minimum security requirements
  • Password confirmation — matching verification

Additional requirements:

  • Terms agreement — checkbox with links to Terms of Service and Privacy Policy
  • Mandatory to complete registration

Alternative methods:

  • "Continue with Google" — registration via Google OAuth

Step 2: Email confirmation

  1. Code is sent to specified email automatically
  2. Enter 6-digit code in "Confirmation Code" field
  3. Click "Confirm" to complete registration
  4. Automatic login after successful confirmation

Important registration features

  • Automatic site detection — system saves information about which site (Agentech/Flutch) the user is registering from
  • Immediately after confirmation automatic system login occurs
  • Redirect to onboarding for new users without a company

New user onboarding

When onboarding starts

Automatic launch for users who:

  • Have completed registration
  • Have no associated company (companyId = null)
  • User type is not Corporate

Onboarding process (/onboarding)

Stage 1: Company information

3-step progress indicator: Your Info → Setup → Ready

Data entry form:

  • Company URL — web address for analysis (required)
  • Your role — selection from preset options:
    • Founder / CEO
    • Product Manager
    • Developer
    • Marketing
    • Sales
    • Other

"Continue" button is activated only when all fields are filled.

Stage 2: Automatic setup

Progress indicator: shows current status

Automatic processes:

  1. Website analysis — studying structure and content
  2. Creating AI agents — personalized assistants
  3. Workspace configuration — system setup
  4. Finalization — completing all settings

Process management:

  • "Cancel" button — cancel and return to form
  • In development mode — additional control elements

Stage 3: Completion

Successful completion:

  • Congratulations screen with confetti animation
  • Workspace ready message
  • "Explore Your Workspace" button — transition to admin panel

Automatic cleanup of temporary onboarding data.

Technical onboarding implementation

  • Stream processing — real-time execution via WebSocket
  • State preservation — ability to continue interrupted process
  • Onboarding AI agent — special agent analyzes site and creates personalized assistants
  • Automatic company creation — no manual input required

Session management

Login state preservation

  • JWT tokens via AWS Cognito — secure authentication
  • Automatic session renewal on activity
  • ReturnUrl preservation — return to original page after login

System logout

  • Complete cleanup of tokens and local state
  • Redirect to login page after logout
  • Secure server-side deauthorization

User types and access rights

Individual users

  • Go through full onboarding
  • Personal company is created
  • Full administrator rights for their workspace

Corporate users

  • Skip onboarding — go directly to existing workspace
  • Rights determined by company administrator
  • Cannot create new companies

Common usage scenarios

Scenario 1: First registration

  1. Go to /signup
  2. Fill registration form with email and password
  3. Agree to terms of use
  4. Receive confirmation code via email
  5. Enter code and automatic login
  6. Automatic onboarding launch
  7. Enter company URL and role
  8. Wait for automatic setup
  9. Enter ready workspace

Scenario 2: Existing user login

  1. Go to /signin
  2. Enter email and continue
  3. Enter password and login
  4. Direct transition to admin panel (skip onboarding)

Scenario 3: Google login

  1. On login or registration page
  2. Click "Continue with Google"
  3. Authorize in Google OAuth
  4. For new users: automatic onboarding launch
  5. For existing users: direct system login

Scenario 4: Password recovery

  1. On login page click "Forgot Password?"
  2. Enter email for recovery
  3. Receive recovery code via email
  4. Enter code and create new password
  5. Automatic login with new password

Important limitations

  • Mandatory email confirmation — cannot be skipped
  • Corporate users don't go through onboarding — directly to admin panel
  • One onboarding attempt — cannot be repeated for same user
  • Valid URL required — onboarding analyzes real website
  • Google OAuth only for login/registration — additional Google API settings

Common problems and solutions

Problem: Confirmation code doesn't arrive

Solutions:

  1. Check "Spam" folder in email
  2. Ensure email address is correct
  3. Wait 2-3 minutes — sometimes there's delay
  4. Request new code (if option available)

Problem: Onboarding hangs during analysis

Solutions:

  1. Ensure website URL is accessible and correct
  2. Check internet connection
  3. Click "Cancel" and try with different URL
  4. Contact support if problem persists

Problem: "Already have an account" but password doesn't match

Solutions:

  1. Use "Forgot Password?" for recovery
  2. Try Google login if you registered through it
  3. Ensure email address is correct
  4. Account might have been created through different method

Problem: Google OAuth doesn't work

Solutions:

  1. Clear cookies and try again
  2. Ensure you're not blocking pop-ups
  3. Check that Google account is active
  4. Try incognito mode

Problem: After login you end up somewhere unexpected

Solutions:

  1. Check URL in address bar — returnUrl might be saved
  2. For new users this is normal — onboarding first
  3. Corporate users go to company workspace
  4. Refresh page if something went wrong

Security

Security measures

  • AWS Cognito — enterprise-level security
  • Two-step authentication — email + password separately
  • Automatic session expiration — protection from inactive accounts
  • HTTPS only — encrypted data transmission
  • Client and server validation — double data verification

Security recommendations

  • Use strong passwords — minimum 8 characters, different types
  • Don't save passwords in browser on shared computers
  • Log out on other people's devices
  • Verify URLs — ensure you're on the correct domain

What's next?

After successful authentication and onboarding:

  1. Explore agent list — see what was created automatically
  2. Configure agents — personalize for your tasks
  3. Create knowledge base — add specific information
  4. Explore dashboard — main interface for work