
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@mastra/auth-cloud
Advanced tools
Affected versions:
Mastra Cloud authentication provider with PKCE OAuth flow.
pnpm add @mastra/auth-cloud
import { Mastra } from '@mastra/core/mastra';
import { MastraCloudAuth } from '@mastra/auth-cloud';
const auth = new MastraCloudAuth({
projectId: process.env.MASTRA_PROJECT_ID!,
// Optional: defaults to https://cloud.mastra.ai
baseUrl: process.env.MASTRA_CLOUD_URL,
// Optional: defaults to /auth/callback
redirectPath: '/auth/callback',
});
const mastra = new Mastra({
server: {
auth,
},
});
| Option | Required | Default | Description |
|---|---|---|---|
projectId | Yes | - | Project ID from cloud.mastra.ai |
baseUrl | No | https://cloud.mastra.ai | Mastra Cloud base URL |
redirectPath | No | /auth/callback | OAuth callback path |
cookieName | No | mastra_session | Session cookie name |
This package implements PKCE OAuth flow with Mastra Cloud:
MastraCloudAuthThe main authentication provider class implementing MastraAuthProvider.
getLoginUrl(state?) - Get OAuth login URL with PKCEhandleCallback(code, verifier) - Exchange code for sessionverifyToken(token) - Verify session and get user with rolerefreshSession(token) - Refresh expiring sessionlogout(token) - Invalidate sessionApache-2.0
FAQs
Mastra Cloud authentication with PKCE OAuth
The npm package @mastra/auth-cloud receives a total of 2,302 weekly downloads. As such, @mastra/auth-cloud popularity was classified as popular.
We found that @mastra/auth-cloud demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.