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

💡 [Feature]: Improve re-login experience #342

Open
Adam-it opened this issue Nov 13, 2024 · 0 comments · May be fixed by #358
Open

💡 [Feature]: Improve re-login experience #342

Adam-it opened this issue Nov 13, 2024 · 0 comments · May be fixed by #358
Assignees
Labels
⭐ enhancement New feature or request 👨‍💻work in progress I am working on it
Milestone

Comments

@Adam-it
Copy link
Member

Adam-it commented Nov 13, 2024

🎯 Aim of the feature

I noticed that SPFx toolkit has a glitch that even though the status command returns that I am logged in, the first command to get the app catalogs from my tenant requires me to sign in which is only visible in the output window. This leads to a state were I am not logged in, I don't see anything in the account and app catalog view, but I also don't see the sign-in button. We should fix it up.

From what i checked the token expired and I need to resign to refresh it. This is fine but:

  • first is the above described problem, I don't see the sign it or out button, I need to 'manually' sign out using the command palette in VS Code and then I am able to relogin
  • when signing out we clear out the client Id and tenant Id. Usually I don't remember those so I just create an another entra app reg. I must have like 40 SPFx Toolkit apps by now on my tenant 😅. What we could do is 'cache' the client and tenant Id so that when next time we relogin and we pick to sign in using the existing client Id and tenant Id we have those fields prefilled with the previous values (when we previously sign in). VS Code has a mechanism for that to preserve state between multiple sessions of VS Code and we could use that.

📷 Images (if possible) with expected result

No response

🤔 Additional remarks or comments

No response

Prototype

  1. in global handle of any CLI command execution we need to add logic that when a login message will get present we should present a notify to the user to relogin to your tenant and sign out user totally and show like initial state
  2. we should persist the ClientID and TenantID in VS Code global state and overwrite it every time we login.
    https://stackoverflow.com/questions/51821924/how-to-persist-information-for-a-vscode-extension
    based on what we have in the global state we should prefill the clientId and tenantId in the login notifys
@Adam-it Adam-it added ⭐ enhancement New feature or request 🤔 research needs researching before I start hacking labels Nov 13, 2024
@Adam-it Adam-it self-assigned this Nov 13, 2024
@Adam-it Adam-it added ✏️prototype and removed 🤔 research needs researching before I start hacking ✏️prototype labels Nov 13, 2024
@Adam-it Adam-it removed their assignment Nov 19, 2024
@Adam-it Adam-it added the 🙏 help wanted Open for contributors label Nov 19, 2024
@Adam-it Adam-it self-assigned this Nov 21, 2024
@Adam-it Adam-it added 👨‍💻work in progress I am working on it and removed 🙏 help wanted Open for contributors labels Nov 21, 2024
@Adam-it Adam-it linked a pull request Nov 22, 2024 that will close this issue
3 tasks
@Adam-it Adam-it linked a pull request Nov 22, 2024 that will close this issue
3 tasks
@Adam-it Adam-it added this to the v4.X milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement New feature or request 👨‍💻work in progress I am working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant