-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Follow up 944: authentication sessions are not persistent #1003
Follow up 944: authentication sessions are not persistent #1003
Conversation
arduino-ide-extension/src/browser/auth/authentication-client-service.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know whether it is in scope for this PR, since I get the same results when using the nightly (#1011), but thought I should report the results of my testing.
Even though it works as expected on my Linux machine, the authentication is not persistent on my Windows machine.
To reproduce
- Open the "Sketchbook" view.
- Click the globe icon (🌐) to open the "Remote Sketchbook" view.
- Click the SIGN IN button.
- Sign in to your Arduino account.
- Switch back to the Arduino IDE window.
🙂 The "Remote Sketchbook" view is in the "Connected" state, showing my remote sketches. - Select File > Quit from the Arduino IDE menus.
- Start the Arduino IDE.
- Open the "Sketchbook" view.
- Click the globe icon (🌐) to open the "Remote Sketchbook" view.
🐛 The "Sketchbook" view contains a SIGN IN button.
Expected behavior
Authentication is persistent through Arduino IDE sessions. The "Remote Sketchbook" remains in a signed in state even after restarting the Arduino IDE.
Arduino IDE version
2.0.0-rc6-snapshot-55c6079
(tester build for 15bb3b5)
Operating system
Windows 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it on Windows and now it works as expected ✔️
To reproduce
- Open the "Sketchbook" view.
- Click the globe icon (🌐) to open the "Remote Sketchbook" view.
- Click the SIGN IN button.
- Sign in to your Arduino account.
- Switch back to the Arduino IDE window.
🙂 The "Remote Sketchbook" view is in the "Connected" state, showing my remote sketches. - Select File > Quit from the Arduino IDE menus.
- Start the Arduino IDE.
- Open the "Sketchbook" view.
- Click the globe icon (🌐) to open the "Remote Sketchbook" view.
🙂 The "Remote Sketchbook" view is in the "Connected" state, showing my remote sketches, which means authentication is persisted through Arduino IDE sessions.
Arduino IDE version
2.0.0-rc6-snapshot-68a7c6c
Operating system
Windows 10
@@ -43,15 +43,14 @@ export class AuthenticationClientService | |||
|
|||
readonly onSessionDidChange = this.onSessionDidChangeEmitter.event; | |||
|
|||
onStart(): void { | |||
async onStart(): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to make it async
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, correct, that was left in from 0a7dbcc
Motivation
Follow up on #992, ensuring we avoid race conditions when setting authOptions prior to initialising our auth service.
Change description
Add Promise return types where necessary and await setOptions before initialising our auth service.
Reviewer checklist