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.

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

close() is used 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

Basic IdentityProvider.close() usage

js
IdentityProvider.close();

Specifications

Specification
Federated Credential Management API
# dom-identityprovider-close

Browser compatibility

desktop mobile
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
Chrome – Full support
Chrome 120 (Release date: 2023-12-05)
footnote Full support
Edge – Full support
Edge 120 (Release date: 2023-12-07)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 106 (Release date: 2023-12-19)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 120 (Release date: 2023-12-05)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 80 (Release date: 2024-01-25)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – No support
WebView Android
footnote No support
WebView on iOS – No support
WebView on iOS
footnote No support

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