-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Add support for IS v2 API with authentication #1002
Conversation
This only updates the `/lookup` API so far. It also doesn't handle falling back to v1.
This adds v2 support with fallback to other IS APIs in the SDK.
for outside readers: the plan is to not continue this fallback once servers are reasonably updated. |
Thanks, wasn't quite sure how to state that at the JS SDK level. Updated original comment to match. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise lgtm, mostly naming concerns
undefined, "POST", "/validate/email/requestToken", | ||
params, httpApi.PREFIX_IDENTITY_V2, isAccessToken, | ||
); | ||
// TODO: Fold callback into above call once v1 path below is removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also make sure to have a maintenance issue on riot-web to clean this fallback up at a future date. Not a blocker for this PR to be merged, but should be done sometime around the merge at latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, good call. I filed element-hq/element-web#10443 for this. I'll link to it in the code as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woo!
This adds support for the IS v2 API in all existing IS APIs. It also adds new support for request IS account tokens (which are new in the v2 API version).
This will fall back to v1 APIs if v2 is not supported for the moment, but this will eventually be removed once servers are updated.
Implements part of MSC2140
Fixes part of element-hq/element-web#10408