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

Nv 942 bug report no way to reset destroy the #2811

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

BiswaViraj
Copy link
Member

What change does this PR introduce?

closes #1289

  • Added a logout method that removes the widget auth token, disconnects the WebSocket

Why was this change needed?

Other information (Screenshots)

@linear
Copy link

linear bot commented Feb 16, 2023

NV-942 🐛 Bug Report: No way to reset / destroy the `widget_user_auth_token` in the iFrame embed.

📜 Description

I have a Vue app that embeds the iFrame option for displaying the notification center. When I log out the existing user and log in as a new user, the notifications don't get updated.

The widget_user_auth_token is not reset and remains the same. Only after a hard refresh on the page does the notification list update.

👟 Reproduction steps

  1. Embed the iFrame in your app.
  2. Log in & check the notification center (also see widget_user_auth_token).
  3. Log out of the current user.
  4. log in as a new user.
  5. Check the notification center (and widget_user_auth_token).

👍 Expected behavior

Step 5 should result in different notifications (and widget_user_auth_token) from step 2.

👎 Actual Behavior with Screenshots

Both the notifications and widget_user_auth_token for steps 2 and for remaining the same.

💻 Operating system

MacOS

🤖 Node Version

16.4

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

No response
Issue URL: #1289

@BiswaViraj BiswaViraj force-pushed the nv-942-bug-report-no-way-to-reset-destroy-the branch from e9612e4 to a8d402b Compare February 16, 2023 15:37
Copy link
Contributor

@p-fernandez p-fernandez left a comment

Choose a reason for hiding this comment

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

🌟

@@ -89,6 +89,7 @@ export interface INovuProviderContext {
fetchingStrategy: IFetchingStrategy;
setFetchingStrategy: (strategy: Partial<IFetchingStrategy>) => void;
onLoad: (data: { organization: IOrganizationEntity }) => void;
logout: VoidFunction;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a TypeScript built in type for void functions? I didn't know about it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it is a part of the DOM lib

@BiswaViraj BiswaViraj added this pull request to the merge queue Feb 17, 2023
Merged via the queue into next with commit c46a5f7 Feb 17, 2023
@BiswaViraj BiswaViraj deleted the nv-942-bug-report-no-way-to-reset-destroy-the branch February 17, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 Bug Report: No way to reset / destroy the widget_user_auth_token in the iFrame embed.
2 participants