
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@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 1,191 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 7 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.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.