vscode-viva icon indicating copy to clipboard operation
vscode-viva copied to clipboard

πŸ’‘ [Feature]: extend access token lifetime

Open Adam-it opened this issue 7 months ago β€’ 9 comments

🎯 Aim of the feature

I got an awesome request from @DonKirkham during ECS conf that the access token lifetime is annoying and when doing longer tasks he sometimes needs to authenticate few times during his work.

TBH I also noticed that but with me the problem is that I am constantly building, refactoring this product and also CLI for M365 which constantly breaks my auth so I never really had a problem with that.

We should investigate first how the reauth works with refresh token when using the cjs version of CLI and check if the problem is not there first.

πŸ“· Images (if possible) with expected result

Image

πŸ€” Additional remarks or comments

No response

Adam-it avatar May 26 '25 21:05 Adam-it

@nicodecleyre, @Saurabh7019 please give this a double check and let me know what is your experience with token lifetime of SPFx toolkit and what do you think of this issue. I will start investigating this in the coming weekend

Adam-it avatar May 26 '25 21:05 Adam-it

The toolkit uses the authentication.getSession from @types\vscode which self manages the refresh token. But it seems there is an option forceNewSession we can use when there is no session, or when it returns the error message indicating that the Access token is expired

nicodecleyre avatar Jun 02 '25 20:06 nicodecleyre

The toolkit uses the authentication.getSession from @types\vscode which self manages the refresh token. But it seems there is an option forceNewSession we can use when there is no session, or when it returns the error message indicating that the Access token is expired

@nicodecleyre but do you also experience this token frequently expiring?

Adam-it avatar Jun 02 '25 20:06 Adam-it

The toolkit uses the authentication.getSession from @types\vscode which self manages the refresh token. But it seems there is an option forceNewSession we can use when there is no session, or when it returns the error message indicating that the Access token is expired

@nicodecleyre but do you also experience this token frequently expiring?

Personally not encountered yet

nicodecleyre avatar Jun 02 '25 20:06 nicodecleyre

@Saurabh7019 what about you?

Adam-it avatar Jun 02 '25 20:06 Adam-it

do you also experience this token frequently expiring

I experience it and I agree it is annoying. I started noticing more and more after the login with support changes.

Saurabh7019 avatar Jun 02 '25 20:06 Saurabh7019

ok I'll start investigating this

Adam-it avatar Jun 02 '25 20:06 Adam-it

so why does it happen with one, and it doesn't with the other. Is it timebased or is it random? πŸ€”

nicodecleyre avatar Jun 02 '25 20:06 nicodecleyre

so why does it happen with one, and it doesn't with the other. Is it timebased or is it random? πŸ€”

no idea πŸ€”

Adam-it avatar Jun 02 '25 21:06 Adam-it