IdentityProvider: close() static method

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The close() static method of the IdentityProvider interface provides a manual signal to the browser that an IdP sign-in flow is finished.

Usage notes

close() needs to be called from the same origin as the IdP sign-in dialog, as defined in the IdP config.

close() is needed to close the IdP sign-in dialog when sign-in is completely finished and the IdP has finished collecting data from the user. A primary use case for close() is closing the IdP sign-in dialog in cases where the browser and the IdP login status become out of sync, and the browser initiates a dynamic sign-in flow to correct the issue.

Syntax

js
IdentityProvider.close()

Parameters

None.

Return value

undefined.

Examples

js
IdentityProvider.close();

Specifications

Specification
Federated Credential Management API
# dom-identityprovider-close

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
close() static method
Experimental

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also