Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move MSAL integration to server-side #58

Closed
yelodevopsi opened this issue Sep 21, 2023 · 4 comments
Closed

Move MSAL integration to server-side #58

yelodevopsi opened this issue Sep 21, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@yelodevopsi
Copy link
Contributor

Current page.tsx uses use client which breaks the CSP integration in middleware.ts.

Find a way to integrate the current functionality from client-side to server-side.

Sources:

Test sample:
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples/msal-react-samples/nextjs-sample

Check out documentation on:
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev

@yelodevopsi yelodevopsi self-assigned this Sep 21, 2023
@yelodevopsi yelodevopsi added the bug Something isn't working label Sep 21, 2023
@yelodevopsi
Copy link
Contributor Author

Still problems with: vercel/next.js#54907

@yelodevopsi
Copy link
Contributor Author

New problems today with CSP on Vercel/Next.js: Not solved:
vercel/next.js#55638

@yelodevopsi
Copy link
Contributor Author

Found that dynamic links are needed, for CSP to work: #54
hence the documentation and example in Next.js (with-strict-csp):

https://github.com/vercel/next.js/blob/canary/examples/with-strict-csp/middleware.js

Need dynamic page to trigger nonce generation.
Because of usage of _app.tsx, this wont trigger on first page properly.

Resolve this and commit changes.

NOTE: use client has been removed/fixed

@yelodevopsi
Copy link
Contributor Author

Much back and forth with CSP bug av vercel. CSP for nonce is currently disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant