The Swoop Developer Hub - Password Free Authentication

Welcome to the Swoop developer hub. You'll find comprehensive guides and documentation to help you start working with Swoop as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Getting started with Swoop only requires 3 lines of Javascript. This guide will show you how to hook up Swoop Authentication to any button on your site.

1. Add the Swoop JS to your page's head

<script src="[email protected]/dist/swoop.js"></script>

2. Initialize Swoop With Your Client ID

Make sure you have registered for a new App in the Swoop Dashboard

  let swoop = new Swoop("swoop_4wtjd4k7nljf30");

3. Create an Authentication Function

    const authenticate = async () => {
    let user = await;
    // user.id_token
    // user.user_meta
    // Send user.id_token to your backend to complete authentication and log the user in

4. Call The Authentication Function

<button onclick="authenticate()">Login</button>

And that's it! Your users are now entered into a Password-Free Paradise.


Security Note

Once the user is authenticated, you should send the user.id_token to your server to be verified with your CLIENT SECRET to ensure the token is valid.

Updated about a month ago


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.