
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@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 302 weekly downloads. As such, @mastra/auth-cloud popularity was classified as not 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 7 open source maintainers collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.