phetsims / rosetta

PhET's Simulation Translation Utility
MIT License
3 stars 1 forks source link

Signing out does not work #400

Closed KatieWoe closed 1 year ago

KatieWoe commented 1 year ago

Device Samsung OS Win 11 Browser Chrome Problem Description For https://github.com/phetsims/qa/issues/931 Pressing the Sign Out button on a translation page takes you to an error page and does not sign you out of your account. Visual

https://user-images.githubusercontent.com/41024075/233691069-8670e578-6626-4381-b0f9-7fc230f48d67.mp4

liammulh commented 1 year ago

Good catch! Thank you, @KatieWoe!

From Slack:

Liam Mulhall 11:52 AM Hey, re https://github.com/phetsims/rosetta/issues/400, did the sign out link change? Right now, in Rosetta it’s <a href={${window.location.origin}/en/sign-out}>Sign Out</a>. (Katie is reporting the error on Ox-Dev.)

Matt Pennington 12:05 PM There is no more sign out page. You would need to call something like this: await fetch( ${DIRECT_ORIGIN}/logout, { method: 'GET', credentials: 'include' } );

Liam Mulhall 12:05 PM Ah, okay thanks (edited)

Matt Pennington 12:05 PM And then redirect to '/' on success 12:05 the credentials: include is critical, or somehow make sure your client sends cookies

Matt Pennington 12:07 PM DIRECT_ORIGIN will be https://phet-direct.colorado.edu

12:07 or https://phet-direct-dev.colorado.edu on ox-dev

liammulh commented 1 year ago

Fix deployed in https://github.com/phetsims/rosetta/commit/6021626a17d44d4a05a0be5cb4a3cbf1a41ccb17 (2.0.7). I couldn't test on Ox-Dev (MP is doing something with it this week) so I deployed to phet-server2 and tested there. I believe it is working. I will re-open if there are further issues.