Sensorclouds Docs
Security

Authentication

How Sensorclouds handles user login and session management

Sensorclouds uses JWT-based authentication with secure httpOnly cookies.

Login

Login Page

  • Authenticate with email + password
  • "Remember me" option controls token storage (localStorage vs sessionStorage)
  • Tokens are stored as httpOnly cookies (secure, sameSite: strict)

Token Details

TokenExpiryPurpose
Access TokenShort-livedAuthorizes API requests
Refresh TokenLonger-livedObtains new access tokens

Token Management

  • Primary method: httpOnly cookies — automatically included in all requests
  • Fallback: Bearer token header — for API clients and integrations
  • Automatic refresh: When the access token expires, the refresh token is used to obtain a new one seamlessly
  • Token rotation: Each refresh generates a new refresh token, invalidating the previous one

Logout

When you log out:

  1. Access and refresh token cookies are cleared
  2. The refresh token is revoked on the server
  3. You are redirected to the login page

Role-Based Redirects

After login, you are redirected based on your role:

RoleRedirect URL
Admin/tenant-admin/home
Engineer/tenant-admin/home
Crew / User/crew/home

On this page