0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
mastra/auth/google
…
History
..
src
CHANGELOG.md
lint-staged.config.js
oxlint.config.ts
package.json
README.md
tsconfig.build.json
tsconfig.json
tsdown.config.ts
turbo.json
vitest.config.ts

@mastra/auth-google

@mastra/auth-google authenticates Google Workspace users and supports authorization based on hosted domains and Workspace identity. Use it when employees should sign in to Mastra with their existing Google organization accounts.

Installation

npm install @mastra/auth-google

Usage

Set GOOGLE_CLIENT_ID before starting Mastra.

import { MastraAuthGoogle } from '@mastra/auth-google';
import { Mastra } from '@mastra/core/mastra';

export const mastra = new Mastra({
  server: {
    auth: new MastraAuthGoogle({
      clientId: process.env.GOOGLE_CLIENT_ID,
      allowedDomains: ['example.com'],
    }),
  },
});

Documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.