guardian / gateway

🕵️🆔👤The platform for authentication at (profile.)theguardian.com
https://profile.theguardian.com
12 stars 1 forks source link

Passwordless | Refactoring check/change password handlers #2865

Closed coldlink closed 2 months ago

coldlink commented 2 months ago

What does this change?

In changePassword.ts and checkPasswordToken.ts the Okta IDX code is inline with the legacy code.

This isn't ideal for adding new features/maintenance.

This PR moved the Okta IDX API code in each file to it's own methods, oktaIdxApiPasswordHandler and oktaIdxApiCheckHandler respectfully for changePassword and checkPasswordToken.

This splits out the Okta IDX code into it's own block, making it easier to manage, especially when we come to add reset password using passcodes.

Tested