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

🐞 Bug report: Token expires and we need to manually sign out and sign in #374

Closed
Adam-it opened this issue Dec 3, 2024 · 1 comment Β· Fixed by #358
Closed

🐞 Bug report: Token expires and we need to manually sign out and sign in #374

Adam-it opened this issue Dec 3, 2024 · 1 comment Β· Fixed by #358
Assignees
Labels
🐞 bug Something isn't working πŸ‘¨β€πŸ’»work in progress I am working on it
Milestone

Comments

@Adam-it
Copy link
Member

Adam-it commented Dec 3, 2024

⭐ Priority

(Medium)😒 I'm annoyed but I'll live

πŸ“ Describe the bug

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

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

πŸ‘£ Steps To Reproduce

it happens every time the token expires

πŸ“œ Expected behavior

should logout the user

πŸ“· Screenshots

No response

❓SharePoint Framework Toolkit version

latest

❓Node.js version

No response

πŸ€” Additional context

Follow up to #342

@Adam-it Adam-it added 🐞 bug Something isn't working πŸ‘¨β€πŸ’»work in progress I am working on it labels Dec 3, 2024
@Adam-it Adam-it self-assigned this Dec 3, 2024
@Adam-it Adam-it added this to the v4.X milestone Dec 3, 2024
@Adam-it
Copy link
Member Author

Adam-it commented Dec 4, 2024

Yesterday I managed to repro this on branch from issue #342 and it turned out this bug will be solved as well as it will by default open the user browser to reauth when using browser auth method

@Adam-it Adam-it linked a pull request Dec 4, 2024 that will close this issue
2 tasks
Adam-it added a commit that referenced this issue Dec 9, 2024
## 🎯 Aim

The aim is to improve and simplify login behavior for SPFx Toolkit and try to
fixup a strange issue with login output when cli command is executed.

## βœ… What was done

- [x] updated login method from device code to browser to simplify the
process
- [x] added saving clientId and tenantId to the global state

## πŸ”— Related issue

Closes #342, #374
@Adam-it Adam-it closed this as completed Dec 9, 2024
Adam-it added a commit that referenced this issue Dec 10, 2024
## 🎯 Aim

The aim is to improve and simplify login behavior for SPFx Toolkit and try to
fixup a strange issue with login output when cli command is executed.

## βœ… What was done

- [x] updated login method from device code to browser to simplify the
process
- [x] added saving clientId and tenantId to the global state

## πŸ”— Related issue

Closes #342, #374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working πŸ‘¨β€πŸ’»work in progress I am working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant