Skip to content

InteractiveBrowserCredential has no way to sign out #15569

@jasonjoh

Description

@jasonjoh
  • Package Name: @azure/identity
  • Package Version: 2.0.0-beta.3
  • Operating system: Windows
  • nodejs
    • version: 14.15.0
  • browser
    • name/version: Edge Insiders 92.0.891.1
  • typescript
    • version: 4.1.2
  • Is the bug related to documentation in

Describe the bug
Using the InteractiveBrowserCredential in a React SPA gives no way to sign out once the user is authenticated. I attempted to force a sign out by redirecting the browser to `` which appeared to work, but the next usage of the credential succeeded without any login prompt.

It appears that there are some values left in session storage after the sign out that is causing this.

image

To Reproduce
Steps to reproduce the behavior:

  1. Unzip repro project signout-repro.zip
  2. Register a SPA app in the Azure portal with redirect http://localhost:3000
  3. Paste your app ID in App.tsx where it says YOUR_APP_ID
  4. Run yarn install or npm install
  5. Run the app with yarn start or npm start
  6. Click Sign in, sign in with an account
  7. Click Sign out
  8. When returned to the app, click Sign in again.

Expected behavior
You should be prompted to login again inside a pop-up window.

Ideally the credential object should have some function to explicitly invalidate or log out.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Azure.IdentityClientThis issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions