import { Account } from "https://deno.land/x/appwrite@12.1.0/mod.ts";
Create OAuth2 token
Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Appwrite console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
If authentication succeeds, userId
and secret
of a token will be
appended to the success URL as query parameters. These can be used to
create a new session using the Create
session
endpoint.
A user is limited to 10 active sessions at a time by default. Learn more about session limits.