Skip to content

Commit c10aa51

Browse files
authored
V3.6.1 (#582)
- updated externs and typescript for SAML/OIDC - updated changelog and readme for v3.6.1
1 parent e154c5b commit c10aa51

File tree

4 files changed

+173
-6
lines changed

4 files changed

+173
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ Localized versions of the widget are available through the CDN. To use a localiz
7070
localized JS library instead of the default library:
7171

7272
```html
73-
<script src="https://www.gstatic.com/firebasejs/ui/3.6.0/firebase-ui-auth__{LANGUAGE_CODE}.js"></script>
74-
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/3.6.0/firebase-ui-auth.css" />
73+
<script src="https://www.gstatic.com/firebasejs/ui/3.6.1/firebase-ui-auth__{LANGUAGE_CODE}.js"></script>
74+
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/3.6.1/firebase-ui-auth.css" />
7575
```
7676

7777
where `{LANGUAGE_CODE}` is replaced by the code of the language you want. For example, the French
7878
version of the library is available at
79-
`https://www.gstatic.com/firebasejs/ui/3.6.0/firebase-ui-auth__fr.js`. The list of available
79+
`https://www.gstatic.com/firebasejs/ui/3.6.1/firebase-ui-auth__fr.js`. The list of available
8080
languages and their respective language codes can be found at [LANGUAGES.md](LANGUAGES.md).
8181

8282
Right-to-left languages also require the right-to-left version of the stylesheet, available at
83-
`https://www.gstatic.com/firebasejs/ui/3.6.0/firebase-ui-auth-rtl.css`, instead of the default
83+
`https://www.gstatic.com/firebasejs/ui/3.6.1/firebase-ui-auth-rtl.css`, instead of the default
8484
stylesheet. The supported right-to-left languages are Arabic (ar), Farsi (fa), and Hebrew (iw).
8585

8686
### Option 2: npm Module

changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fixed - Fixed the issue where the providerName for generic OAuth, OIDC and SAML providers does not default to providerId.
2+
fixed - Added externs and typescript type declaration for generic OAuth, OIDC and SAML providers sign-in options.

externs/firebaseui-externs.js

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,143 @@ firebaseui.auth.FederatedSignInOption.prototype.scopes;
377377
*/
378378
firebaseui.auth.FederatedSignInOption.prototype.customParameters;
379379

380+
381+
/**
382+
* Defines the sign-in option needed to configure the FirebaseUI SAML
383+
* sign-in widget.
384+
*
385+
* @interface
386+
* @extends {firebaseui.auth.SignInOption}
387+
*/
388+
firebaseui.auth.SamlSignInOption = function() {};
389+
390+
/**
391+
* The provider name displayed to end users
392+
* (sign-in button label/linking prompt).
393+
* Default: provider ID
394+
*
395+
* @type {string|undefined}
396+
*/
397+
firebaseui.auth.SamlSignInOption.prototype.providerName;
398+
399+
/**
400+
* The color of the sign-in button.
401+
*
402+
* @type {string}
403+
*/
404+
firebaseui.auth.SamlSignInOption.prototype.buttonColor;
405+
406+
/**
407+
* The URL of the Identity Provider's icon. This will be displayed on the
408+
* provider's sign-in button, etc.
409+
*
410+
* @type {string}
411+
*/
412+
firebaseui.auth.SamlSignInOption.prototype.iconUrl;
413+
414+
415+
/**
416+
* Defines the sign-in option needed to configure the FirebaseUI generic OAuth
417+
* sign-in widget.
418+
*
419+
* @interface
420+
* @extends {firebaseui.auth.SignInOption}
421+
*/
422+
firebaseui.auth.OAuthSignInOption = function() {};
423+
424+
/**
425+
* The provider name displayed to end users
426+
* (sign-in button label/linking prompt),
427+
* eg. "Microsoft". Default: provider ID, eg. "microsoft.com"
428+
*
429+
* @type {string|undefined}
430+
*/
431+
firebaseui.auth.OAuthSignInOption.prototype.providerName;
432+
433+
/**
434+
* The color of the sign-in button.
435+
*
436+
* @type {string}
437+
*/
438+
firebaseui.auth.OAuthSignInOption.prototype.buttonColor;
439+
440+
/**
441+
* The URL of the Identity Provider's icon. This will be displayed on the
442+
* provider's sign-in button, etc.
443+
*
444+
* @type {string}
445+
*/
446+
firebaseui.auth.OAuthSignInOption.prototype.iconUrl;
447+
448+
/**
449+
* The list of additional OAuth 2.0 scopes beyond basic profile that you want
450+
* to request from the authentication provider.
451+
*
452+
* @type {!Array<string>|undefined}
453+
*/
454+
firebaseui.auth.OAuthSignInOption.prototype.scopes;
455+
456+
/**
457+
* The custom OAuth parameters for the selected OAuth provider.
458+
*
459+
* @type {!Object|undefined}
460+
*/
461+
firebaseui.auth.OAuthSignInOption.prototype.customParameters;
462+
463+
/**
464+
* The key of the custom parameter, with which the login hint can be passed to
465+
* the provider. This is useful in case a user previously signs up with an IdP
466+
* like Microsoft and then tries to sign in with email using the same Microsoft
467+
* email. FirebaseUI can then ask the user to sign in with that email to the
468+
* already registered account with Microsoft. For Microsoft and Yahoo, this
469+
* field is `login_hint`.
470+
*
471+
* @type {string|undefined}
472+
*/
473+
firebaseui.auth.OAuthSignInOption.prototype.loginHintKey;
474+
475+
476+
/**
477+
* Defines the sign-in option needed to configure the FirebaseUI OIDC
478+
* sign-in widget.
479+
*
480+
* @interface
481+
* @extends {firebaseui.auth.SignInOption}
482+
*/
483+
firebaseui.auth.OidcSignInOption = function() {};
484+
485+
/**
486+
* The provider name displayed to end users
487+
* (sign-in button label/linking prompt).
488+
* Default: provider ID
489+
*
490+
* @type {string|undefined}
491+
*/
492+
firebaseui.auth.OidcSignInOption.prototype.providerName;
493+
494+
/**
495+
* The color of the sign-in button.
496+
*
497+
* @type {string}
498+
*/
499+
firebaseui.auth.OidcSignInOption.prototype.buttonColor;
500+
501+
/**
502+
* The URL of the Identity Provider's icon. This will be displayed on the
503+
* provider's sign-in button, etc.
504+
*
505+
* @type {string}
506+
*/
507+
firebaseui.auth.OidcSignInOption.prototype.iconUrl;
508+
509+
/**
510+
* The list of additional custom parameters that the OIDC provider supports.
511+
*
512+
* @type {!Object|undefined}
513+
*/
514+
firebaseui.auth.OidcSignInOption.prototype.customParameters;
515+
516+
380517
/**
381518
* Defines the sign-in option needed to configure the FirebaseUI email sign-in
382519
* widget.

types/index.d.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,40 @@ interface SignInOption {
3232
provider: string;
3333
}
3434

35+
36+
interface SamlSignInOption extends SignInOption {
37+
providerName?: string;
38+
buttonColor: string;
39+
iconUrl: string;
40+
}
41+
42+
3543
interface FederatedSignInOption extends SignInOption {
3644
authMethod?: string;
3745
clientId?: string;
3846
scopes?: string[];
3947
customParameters?: object;
4048
}
4149

50+
51+
interface OAuthSignInOption extends SignInOption {
52+
providerName?: string;
53+
buttonColor: string;
54+
iconUrl: string;
55+
scopes?: string[];
56+
customParameters?: object;
57+
loginHintKey?: string;
58+
}
59+
60+
61+
interface OidcSignInOption extends SignInOption {
62+
providerName?: string;
63+
buttonColor: string;
64+
iconUrl: string;
65+
customParameters?: object;
66+
}
67+
68+
4269
interface ActionCodeSettings {
4370
url: string;
4471
handleCodeInApp?: boolean;
@@ -83,8 +110,9 @@ declare namespace firebaseui.auth {
83110
queryParameterForSignInSuccessUrl?: string;
84111
queryParameterForWidgetMode?: string;
85112
signInFlow?: string;
86-
signInOptions?: Array<string
87-
| FederatedSignInOption | EmailSignInOption | PhoneSignInOption>;
113+
signInOptions?:
114+
Array<string|FederatedSignInOption|EmailSignInOption|PhoneSignInOption|
115+
SamlSignInOption|OAuthSignInOption|OidcSignInOption>;
88116
signInSuccessUrl?: string;
89117
siteName?: string;
90118
tosUrl?: (() => void) | string;

0 commit comments

Comments
 (0)