-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
refactor: Change response types of TOTP adapter to match existing adapters #8661
Conversation
I will reformat the title to use the proper commit message syntax. |
Thanks for opening this pull request! |
@cbaker6 let me know if this looks better |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## alpha #8661 +/- ##
=======================================
Coverage 94.39% 94.39%
=======================================
Files 185 185
Lines 14760 14761 +1
=======================================
+ Hits 13932 13933 +1
Misses 828 828
☔ View full report in Codecov by Sentry. |
@dblythy the updates look good to me |
I’ve just realised I’ve missed one thing |
@cbaker6 I've also adapted the "additional auth data" when logging in, Previous: {
username: 'username',
password: 'password',
authData: {
mfa: totp.generate()
},
} New: {
username: 'username',
password: 'password',
authData: {
mfa: {
token: totp.generate()
}
},
} Is this correct? |
would be a type structure of:
It would be the same type structure that is in the REST API example:
So that should be good I'd say. Is any of this a breaking change, or is this PR only affecting code on the pre-release branches? |
Only affects the alpha branch |
So now both the request and response have a type structure of:
Is that right? |
Correct! Which should allow for easier integration in strongly typed SDKs, such as the SwiftSDK |
Sounds good, I'll re-run the CI until it passes |
Is this ready for merge? |
@cbaker6 did you want to have one final review before we merge? |
The label |
🎉 This change has been released in version 6.3.0-alpha.6 |
🎉 This change has been released in version 6.4.0-beta.1 |
🎉 This change has been released in version 6.4.0-alpha.1 |
🎉 This change has been released in version 6.4.0 |
@mtrezza I mentioned on the forum also but is it really fine to store any of the *_secret API keys on each user authData ? |
Pull Request
Issue
The TOTP adapter has mixed return types, making it incompatible with strongly typed client SDKS.
There's also an additional issue with the TOTP adapter that is fixed in this PR as well.
Closes: #8660
Approach
Changes the response of
enabled: true
tostatus: "enabled"
Tasks