infinity6i6 Builders Platform
Documentation

Getting started

Overview

Web SDK authentication through a cookie session set by the platform.

1 min read

In the web SDK there is no API key to configure. Authentication is a cookie session set by the platform.

How the SDK sees the session

html
<script type="module">
  async function main() {
    const sdk = new window.I6Sdk();
    const user = await sdk.auth().requireUser();
    if (!user) return;
    // from here on there is an active session
  }
  main();
</script>

requireUser() returns the user profile when a session is active. Without a session, the SDK sends the browser to the platform login.

Sending credentials

SDK calls to the platform API use credentials: "include", so the session cookie travels with the request.

What does not exist here

There is no API key, scope or authorization header to fill in the web SDK.

Next step

Login flow

How the SDK sends the user to login.

Continue