LogoLogo
  • Welcome to OneAuxilia Docx
  • UI Component
    • Overview
    • <OneAuxiliaProvider>
    • Authentication Components
      • <SignIn />
      • <SignUp />
      • <GoogleOneTap />
    • User Components
      • <UserButton />
      • <UserProfile />
    • Organization Components
      • <CreateOrganization />
      • <OrganizationProfile />
      • <OrganizationSwitcher />
      • <OrganizationList />
    • Control Components
      • <AuthenticateWithRedirectCallback />
      • <OneAuxiliaLoaded>
      • <OneAuxiliaLoading>
      • <Protect>
      • <MultisessionAppSupport>
      • <RedirectToSignIn />
      • <RedirectToSignUp />
      • <RedirectToUserProfile />
      • <RedirectToOrganizationProfile />
      • <RedirectToCreateOrganization />
      • <SignedIn>
      • <SignedOut>
    • Unstyled Components
      • <SignInButton>
      • <SignInWithMetamaskButton>
      • <SignUpButton>
      • <SignOutButton>
  • Quick Start
  • Users
    • Overview
    • Metadata
    • Delete User
  • Organization
    • Organization, Role and Permission
      • Overview
      • Role and Permission
      • Guides
        • Create Role and assign Permission
        • Verify the active user's permission
        • Reassign the Creator role
      • Building custom flow
    • Multi Tenant Setting
  • Application
    • Application
    • User Portal
  • Authentication
    • Setting
    • Social Connectors
    • Multi Factor
  • Customize
    • Branding
    • Sign Up vs Sign In
      • Overview
      • Configuration
        • Sign-up and Sign-in options
        • Session Option
        • Email and SMS templates
      • Social Connection
        • Overview
        • Social connections (OAuth)
        • Account Linking
        • Setup Social Account Linking
  • Development
    • API Key
    • Local Path
    • Custom JWT templates
    • Domain
    • Webhook
    • Backend Request
      • Overview
      • Making requests
        • Same-origin requests
        • Cross-origin requests
        • Customize your session token
      • Handling requests
        • Manual JWT verification
      • Session Management
  • SDK References
    • React
      • Overview
      • Guides
        • Add React Router
      • Client-side Helpers
        • useUser()
        • useOneAuxilia()
        • useAuth()
        • useSignIn()
        • useSignUp()
        • useSession()
        • useSessionList()
        • useOrganization()
        • useOrganizationList()
  • API References
    • Open API
  • industry reference
    • Ecommerce
    • Broadcasting
    • IoT
Powered by GitBook
On this page
  • Request Authentication
  • Frontend requests
  • Backend requests
  • Required headers
  1. Development
  2. Backend Request

Overview

PreviousBackend RequestNextMaking requests

Last updated 10 months ago

Request Authentication

A request is considered “authenticated” when the backend can securely identify the user and device that is making the request. The reasons for making authenticated requests to the backend include:

  • Associating the user with the action being performed

  • Ensuring the user has permission to make the request

  • Keeping an audit log of which device the user is performing actions from

In order to authenticate the user on the backend using OneAuxilia's SDK, the short-lived needs to be passed to the server.

Frontend requests

To make authenticated requests from the frontend, the approach differs based on whether your client and server are on the same origin.

The origin includes the protocol, hostname, and port (optional):

<protocol>//<hostname>[:<port>]

Same-Origin

For same-origin requests, refer to our guide on .

Cross-Origin

For cross-origin requests, refer to our guide on .

Backend requests

OneAuxilia provides various middleware packages to set the session property for easy access. These packages can also require a session to be available on the current request. Choose the guide based on the language or framework you're using:

  • NodeJs/Express

  • Golang (Comming Soon)

  • Python (Comming Soon)

  • Java (Comming Soon)

  • .NET (Comming Soon)

If there is not middleware available for your preferred language or framework, you can extract the session token manually or using Open API.

Same-origin

For same-origin requests, the session token is included in the __session cookie and you can use an open source library to parse the cookie on the back-end.

Cross-origin

For cross-origin requests, the Bearer token inside the Authorization header contains the session token.

Required headers

The following headers are required for Clerk to authenticate a request. It contains information that Clerk uses to determine whether a request is in a signed in or signed out state, or if a handshake must be performed.

You can read more about for additional information.

Alternatively, you can use

session token
making same-origin requests
making cross-origin requests
manual JWT verification
Authorization
Accpet
Host
Origin
Referer
Sec-Fetch-Dest
User-Agent
X-Forwarded-Host
X-Forwarded-Proto
CloudFront-Forwarded-Proto