clerk / javascript

Official Javascript repository for Clerk authentication
https://clerk.com
MIT License
958 stars 212 forks source link

fix(clerk-js): Avoid sending password when saml is enabled #3578

Closed panteliselef closed 3 weeks ago

panteliselef commented 3 weeks ago

Description

Video with the fixed flows

https://www.loom.com/share/54775174c83d4a23a00fda669789848b?sid=6149812c-9df7-43f1-b896-400c138b4791

This PR addresses an issue with our SignIn component due to the existence of the hidden password field.

Stale information in password managers would autofill email + password for email addresses that require SAML to be used. In that scenario, FAPi would return an field error that was not displayed in the component, causing frustration to end users that could not logged in.

The solution is to "detect" the intention of the end user, and quickly recover from it by signing them in, with password or with SAML.

Checklist

Type of change

changeset-bot[bot] commented 3 weeks ago

πŸ¦‹ Changeset detected

Latest commit: 3470a88335fde0547b42d1562a771466705c0d85

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages | Name | Type | | ----------------------- | ----- | | @clerk/clerk-js | Patch | | @clerk/chrome-extension | Patch | | @clerk/clerk-expo | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

tmilewski commented 3 weeks ago

!snapshot

clerk-cookie commented 3 weeks ago
Hey @tmilewski - the snapshot version command generated the following package versions: Package Version
@clerk/chrome-extension 1.0.19-snapshot.vcc64bf8
@clerk/clerk-js 5.7.1-snapshot.vcc64bf8
@clerk/elements 0.8.0-snapshot.vcc64bf8
@clerk/clerk-expo 1.2.2-snapshot.vcc64bf8
gatsby-plugin-clerk 5.0.0-beta.45
@clerk/remix 4.1.2-snapshot.vcc64bf8

Tip: Use the snippet copy button below to quickly install the required packages. @clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.19-snapshot.vcc64bf8 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.7.1-snapshot.vcc64bf8 --save-exact

@clerk/elements

npm i @clerk/elements@0.8.0-snapshot.vcc64bf8 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.2.2-snapshot.vcc64bf8 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact

@clerk/remix

npm i @clerk/remix@4.1.2-snapshot.vcc64bf8 --save-exact
panteliselef commented 3 weeks ago

!snapshot

panteliselef commented 3 weeks ago

!snapshot

clerk-cookie commented 3 weeks ago
Hey @panteliselef - the snapshot version command generated the following package versions: Package Version
@clerk/chrome-extension 1.0.19-snapshot.v3470a88
@clerk/clerk-js 5.7.1-snapshot.v3470a88
@clerk/elements 0.8.0-snapshot.v3470a88
@clerk/clerk-expo 1.2.2-snapshot.v3470a88
gatsby-plugin-clerk 5.0.0-beta.45
@clerk/remix 4.1.2-snapshot.v3470a88
@clerk/upgrade 1.0.8-snapshot.v3470a88

Tip: Use the snippet copy button below to quickly install the required packages. @clerk/chrome-extension

npm i @clerk/chrome-extension@1.0.19-snapshot.v3470a88 --save-exact

@clerk/clerk-js

npm i @clerk/clerk-js@5.7.1-snapshot.v3470a88 --save-exact

@clerk/elements

npm i @clerk/elements@0.8.0-snapshot.v3470a88 --save-exact

@clerk/clerk-expo

npm i @clerk/clerk-expo@1.2.2-snapshot.v3470a88 --save-exact

gatsby-plugin-clerk

npm i gatsby-plugin-clerk@5.0.0-beta.45 --save-exact

@clerk/remix

npm i @clerk/remix@4.1.2-snapshot.v3470a88 --save-exact

@clerk/upgrade

npm i @clerk/upgrade@1.0.8-snapshot.v3470a88 --save-exact