This example demonstrates how to generate and use SQLite Cloud Access Tokens and integrate them into your authentication flow, such as Google Login.
SQLite Cloud Access Tokens allow your users to access SQLite Cloud services, like SQLite Sync or querying your database.
To restrict user access via Access Tokens, enable Row Level Security policies on your database tables.
Read more about SQLite Cloud Access Tokens in the official documentation.
This project is built with Express.js and TypeScript and requires Node.js.
-
If you don't have an account, create one at SQLite Cloud and obtain your Connection String.
-
In the root of the project directory, rename the
.env.examplefile to.envand set your Connection String. -
Go to the Google Cloud Console and obtain your Google OAuth credentials from https://console.cloud.google.com/apis/credentials.
Then copy the Client ID and Client Secret into the.envfile. -
Run:
npm install && npm run start- The server will start at http://localhost:3003.