GTA World OAuth provider for AuthJS.
npm install @gtaw-oauth-providers/authjs``ts`
import NextAuth from "next-auth";
import { GTAWorldProvider } from "@gtaw-oauth-providers/authjs";
export const { handlers, signIn, signOut, auth, unstable_update } = NextAuth({
providers: [
GTAWorldProvider({
clientId: process.env.GTAW_OAUTH_CLIENT_ID,
clientSecret: process.env.GTAW_OAUTH_CLIENT_SECRET,
server: "fr", // if you're targeting GTA World France. If not, omit.
}),
],
});
* server "en" or "fr" (default: "en"`.
Define the appropriate base URL for the target server. (example, "fr" sets the base URL of the OAuth endpoint to https://ucp-fr.gta.world`)
> Note: This script was not created by the GTA World team.