Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Made-with: Cursor
1.1 KiB
1.1 KiB
MIM4U Portals — Session Cookie Configuration
Purpose: Ensure Portals (and any auth) use secure session cookies: HttpOnly, Secure, SameSite.
Where to configure
- Azure Static Web Apps / Entra (Azure AD): If MIM4U uses Azure for auth, session cookies are typically set by the platform. In Azure Portal → App registrations → your app → Authentication, ensure:
- Redirect URIs use
https://mim4u.org(andhttps://secure.mim4u.orgif used). - Implicit grant and legacy options are off unless required.
- Redirect URIs use
- Custom API (VMID 7811): If the API issues its own session cookies (e.g. JWT in cookie or session id), set when setting the cookie:
HttpOnly=trueSecure=true(only over HTTPS)SameSite=LaxorStrictPath=/or the minimal path needed
Example (Node/Express-style)
res.cookie('session', token, {
httpOnly: true,
secure: true,
sameSite: 'lax',
path: '/',
maxAge: 24 * 60 * 60 * 1000
})
NPMplus / nginx
NPMplus terminates SSL; it does not set application session cookies. Cookie flags are set by the application (Azure or API on 7811).