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

feat: add authentication #140

Merged
merged 6 commits into from
Jan 23, 2025
Merged

feat: add authentication #140

merged 6 commits into from
Jan 23, 2025

Conversation

Jone-Torgersen
Copy link
Contributor

@Jone-Torgersen Jone-Torgersen commented Jan 22, 2025

Description

  • Adds authentication using MSAL.
  • Enables authentication on backend endpoints
  • Adds logout button to user menu

Testing Done

Type of change

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to break)
  • Documentation update required for this change

Checklist:

  • My code adheres to the style guidelines of this project
  • I have performed a self-review of my code
  • I have added comments to my code, especially in complex areas
  • I have updated the documentation accordingly
  • My changes do not introduce any new warnings
  • I have added tests to validate the effectiveness of my fix or the functionality of my feature
  • Both new and existing unit tests pass locally with my changes
  • I have considered and addressed any potential security implications

- added msal package and implemented auth config and provider
- updated environment variables to pass redirect uri for each env
- refactored fetcher to get token using msal and add auth header to all requests
- enabled authentication on endpoints
- added Authprovider at the top level to ensure authentication is required to view the page content
- added logout button to user menu using msals useMsal() hook
- added username to top of user menu
@Jone-Torgersen Jone-Torgersen merged commit 347de06 into main Jan 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants