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

Refresh token should be used in re-authorization flow (Gemini) #10978

Closed
ryanml opened this issue Jul 28, 2020 · 2 comments · Fixed by brave/brave-core#6242
Closed

Refresh token should be used in re-authorization flow (Gemini) #10978

ryanml opened this issue Jul 28, 2020 · 2 comments · Fixed by brave/brave-core#6242

Comments

@ryanml
Copy link
Contributor

ryanml commented Jul 28, 2020

Currently, in the case of an invalid access token, the user presented with a message notifying them of the invalidity, and prompting them to re-connect. The refresh_token retrieved when creating the access token should be used it becomes invalid to retrieve another one. The re-connect messaging should only be shown in cases where the refresh action could not be achieved.

Test Plan:

  1. Open up the NTP
  2. Connect to your Gemini account in the widget, confirm no regressions.
  3. Disconnect, then reconnect again, confirm no regressions.
  4. It isn't really practical to wait the full period for the token to expire, but what can be done is running:
chrome.gemini.refreshAccessToken((success) => console.log(success))

Within the console from the NTP. You should see it return true, and can confirm the new token works appropriately by updating balance or performing a trade.

@srirambv
Copy link
Contributor

srirambv commented Aug 25, 2020

Verification passed on

Brave 1.13.79 Chromium: 85.0.4183.69 (Official Build) dev (64-bit)
Revision 4554ea1a1171bd8d06951a4b7d9336afe6c59967-refs/branch-heads/4183@{#1426}
OS Linux
  • Verified test plan from issue description
    image
  • Verified Connect to Gemini opens authorization link
  • Verified able to sign in using an existing account connects the widget
  • Verified registration process works as expected
  • Verified Allow works fine in authenticating the widget and loads the account details in the widget
    image
  • Verified Deny and exit loads the error page as expected
    image
  • Verified denying access token doesn't connect the widget
  • Verified logging out from Gemini website doesn't lose the connected state of the widget
  • Verified once authenticated, the widget shows the balance in hidden view
  • Verified able to trade (buy/sell) once connected
  • Verified able to send/deposit crypto once connected and is listed in the widget automatically or via refresh data
  • Verified widget state is retained between browser launches
  • Verified able to disconnect account via widget menu
  • Verified clearing browser data doesn't disconnect widget or reset the state
  • Logged follow up issue [Desktop][CW] Widget authentication fails  #11415

Verification passed on

Brave 1.13.79 Chromium: 85.0.4183.69 (Official Build) dev (64-bit)
Revision 4554ea1a1171bd8d06951a4b7d9336afe6c59967-refs/branch-heads/4183@{#1426}
OS Windows 10 OS Version 1809 (Build 17763.1397)
  • Verified test plan from issue description
    image
  • Verified Connect to Gemini opens authorization link
  • Verified able to sign in using an existing account connects the widget
  • Verified registration process works as expected
  • Verified Allow works fine in authenticating the widget and loads the account details in the widget
  • Verified Deny and exit loads the error page as expected
    image
  • Verified denying access token doesn't connect the widget
    image
  • Verified logging out from Gemini website doesn't lose the connected state of the widget
  • Verified once authenticated, the widget shows the balance in hidden view
  • Verified able to trade (buy/sell) once connected
  • Verified able to send/deposit crypto once connected and is listed in the widget automatically or via refresh data
  • Verified widget state is retained between browser launches
  • Verified able to disconnect account via widget menu
  • Verified clearing browser data doesn't disconnect widget or reset the state
  • Encountered issue [Desktop][CW] Widget authentication fails  #11415

Verification passed on

Brave 1.13.79 Chromium: 85.0.4183.69 (Official Build) dev (64-bit)
Revision 4554ea1a1171bd8d06951a4b7d9336afe6c59967-refs/branch-heads/4183@{#1426}
OS macOS Version 10.15.5 (Build 19F101)
  • Verified test plan from issue description
    image
  • Verified Connect to Gemini opens authorization link
  • Verified able to sign in using an existing account connects the widget
  • Verified registration process works as expected
  • Verified Allow works fine in authenticating the widget and loads the account details in the widget
  • Verified Deny and exit loads the error page as expected
    image
  • Verified denying access token doesn't connect the widget
    image
  • Verified logging out from Gemini website doesn't lose the connected state of the widget
  • Verified once authenticated, the widget shows the balance in hidden view
  • Verified able to trade (buy/sell) once connected
  • Verified able to send/deposit crypto once connected and is listed in the widget automatically or via refresh data
  • Verified widget state is retained between browser launches
  • Verified able to disconnect account via widget menu
  • Verified clearing browser data doesn't disconnect widget or reset the state
  • Encountered issue [Desktop][CW] Widget authentication fails  #11415

@LaurenWags
Copy link
Member

changing to release-notes/exclude per discussion with @rebron

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment