Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cbiesinger
Copy link
Collaborator

@cbiesinger cbiesinger commented Oct 3, 2024

way.
1. Wait for one of the following conditions:
* The user closes the browsing context: return failure.
* {{IdentityProvider}}.{{IdentityProvider/close}} is called in the

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?

Copy link
Collaborator

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!

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)

@ThisIsMissEm
Copy link

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
Copy link
Collaborator

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:

Suggested change
1. If {{IdentityProviderToken/token}} was not specified but
1. If {{IdentityProviderToken/token}} was specified
1. let |tokenString| be |token|'s {{IdentityProviderToken/token}}.
1. else

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)

Copy link
Collaborator

@samuelgoto samuelgoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants