Skip to content

feat: implementation of logout functionality#838

Merged
Roopan-Microsoft merged 9 commits into
devfrom
LogoutFunctionality_Akhileswar
May 8, 2026
Merged

feat: implementation of logout functionality#838
Roopan-Microsoft merged 9 commits into
devfrom
LogoutFunctionality_Akhileswar

Conversation

@Akhileswara-Microsoft

@Akhileswara-Microsoft Akhileswara-Microsoft commented May 6, 2026

Copy link
Copy Markdown
Contributor

Purpose

This pull request refactors how user authentication and profile information are handled in the app header. The user avatar and login/logout functionality are now encapsulated in a new LoginButton component, which provides a user menu and displays the user's name and email. Additionally, user email is now fetched and stored in the Redux state, and the header code has been simplified as a result.

These changes make the app header more modular and user-friendly, and improve robustness and clarity in handling user authentication data.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Azure Easy Auth–backed authentication state to the React frontend and updates the header UI to show a user avatar with a sign-out menu.

Changes:

  • Introduces an AuthContext (AuthProvider + useAuth) that reads user claims from /.auth/me and exposes login/logout redirects.
  • Adds a LoginButton component that renders an avatar-based menu with a “Sign out” action.
  • Wraps the app in AuthProvider and swaps the header avatar for the new component.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
src/App/src/main.tsx Wraps the app with AuthProvider so auth state is available globally.
src/App/src/contexts/AuthContext.tsx New context for Easy Auth user loading + login/logout redirects.
src/App/src/components/LoginButton.tsx New header avatar/menu UI for user display and sign-out.
src/App/src/components/AppHeader.tsx Replaces the previous Avatar with LoginButton.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/App/src/components/AppHeader.tsx
Comment thread src/App/src/contexts/AuthContext.tsx Outdated
Comment thread src/App/src/contexts/AuthContext.tsx Outdated
Comment thread src/App/src/components/LoginButton.tsx
Comment thread src/App/src/components/LoginButton.tsx Outdated
Comment thread src/App/src/components/LoginButton.tsx
Copilot AI review requested due to automatic review settings May 6, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread src/App/src/store/appSlice.ts Outdated
Comment thread src/App/src/components/LoginButton.tsx Outdated
Comment thread src/App/src/components/LoginButton.tsx
Comment thread src/App/src/components/LoginButton.tsx
Comment thread src/App/src/App.tsx
…-label on LoginButton buttons

Agent-Logs-Url: https://github.com/microsoft/content-generation-solution-accelerator/sessions/22315c19-138c-49fc-9d54-060a30972272

Co-authored-by: Akhileswara-Microsoft <234037885+Akhileswara-Microsoft@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 6, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread src/App/src/components/LoginButton.tsx Outdated
Comment thread src/App/src/components/LoginButton.tsx
@Roopan-Microsoft
Roopan-Microsoft merged commit 7a5344e into dev May 8, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants