-
Notifications
You must be signed in to change notification settings - Fork 72
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
Specify the continuation API #662
base: main
Are you sure you want to change the base?
Conversation
way. | ||
1. Wait for one of the following conditions: | ||
* The user closes the browsing context: return failure. | ||
* {{IdentityProvider}}.{{IdentityProvider/close}} is called in the |
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.
Should this actually be a reject()
if the completion mechanism is resolve()
— borrowing naming from Promises?
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.
Ah yeah, that sounds nicer to me too!
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.
That or something like abort(reason?: string)
and finish(token: string, accountId?: string)
I'm glad to see this idea being implemented! |
@@ -1240,9 +1240,25 @@ To <dfn>fetch an identity assertion</dfn> given a {{USVString}} | |||
1. [=converted to an IDL value|Convert=] |json| to an {{IdentityProviderToken}}, |token|. | |||
1. If one of the previous two steps threw an exception, set |credential| to failure | |||
and return. | |||
1. If neither {{IdentityProviderToken/token}} nor {{IdentityProviderToken/continue_on}} was | |||
specified, set |credential| to failure and return. | |||
1. If {{IdentityProviderToken/token}} was not specified but |
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.
Just small nit and for clarity, but I'd return early here:
1. If {{IdentityProviderToken/token}} was not specified but | |
1. If {{IdentityProviderToken/token}} was specified | |
1. let |tokenString| be |token|'s {{IdentityProviderToken/token}}. | |
1. else |
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.
should that be 1. Else if {{IdentityProviderToken/continue_on}} was specified:
?
I think the Otherwise
also would need to be removed with this change (L1256)
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.
Minor nit
Bug: w3c-fedid/custom-requests#1
Preview | Diff