Arctic

Arctic was deprecated in July 2026 (announcement). Some example code with comments to replace the package can be found under /code directory in the repository (see below). The old documentation and API reference can be found in the GitHub repository.

For a basic OAuth 2.0 flow, the user is first redirected to the authorization server (e.g. google.com) to sign in. This is called the authorization request. Next, the user is redirected back to your server with an authorization code in the URL query string. Your server exchanges that authorization code for a new access token by sending an access token request to the authorization server. The authorization server may also return a refresh token, which can be exchanged for a new access token in the future by sending another access token request.

Before starting, you should do the following:

Example code:

For a deep dive on everything auth, see the Auth Book. Feel free to ask questions on the Discord server linked in the book.

This website is maintained by Pilcrow. The source code is hosted at github.com/pilcrowonpaper/arctic.