Real-Dev-Squad / website-status

Shows a roadmap of the ongoing projects being done
https://status.realdevsquad.com/
MIT License
21 stars 145 forks source link

Unnecessary toast coming without any action by user #458

Closed satyam73 closed 1 year ago

satyam73 commented 1 year ago

When going to the status-site and in not logged in state then this pop up shows up here even without any action done by user. We have to fix this issue. image

arpit01923 commented 1 year ago

I am able resolve this issue. Assign it to me

arpit01923 commented 1 year ago

Hey @satyam73 @Maheima I have gone through the issue Issue is, for "/users/self" API, user must be authenticated. The toast is shown when user is not signin. There are 2 ways to remove this issue -

  1. If user is not authenticated, user not able to access status route and remove status tab from navbar till user is not authenticated.
  2. Simply remove the toastify from that api.

Please suggest which way to choose and shall I have to write tests for this?

Maheima commented 1 year ago

Second approach seems better of the two to me what do you think @ankushdharkar @vvaibhavdesai @harshith-venkatesh

ankushdharkar commented 1 year ago

@arpit01923 @Maheima We want guest users (not-signed in) to be able to access the status page in a read-only mode.

I am okay with the toast being removed, but before moving forward with [2.], could you please look into why it was added into the API handler in the first place?

arpit01923 commented 1 year ago

@ankushdharkar If we want guest users (not-signed in) to be able to access the status page in a read-only mode.

Then there is no need of authorization token "/users/self" API

ankushdharkar commented 1 year ago

@arpit01923 I think that API serves another purpose in the navbar, so would still require the token. Please check with the other developers.

arpit01923 commented 1 year ago

@ankushdharkar Will check it.

satyam73 commented 1 year ago

Hey @arpit01923 How's it going on with the issue?

arpit01923 commented 1 year ago

Hey @satyam73 Already completed the issue, just merge is pending