aboutsummaryrefslogtreecommitdiff
path: root/lib/vnlib.browser
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vnlib.browser')
-rw-r--r--lib/vnlib.browser/src/social/index.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/vnlib.browser/src/social/index.ts b/lib/vnlib.browser/src/social/index.ts
index dac3cc9..7d80687 100644
--- a/lib/vnlib.browser/src/social/index.ts
+++ b/lib/vnlib.browser/src/social/index.ts
@@ -55,6 +55,7 @@ export interface SocialOAuthPortal {
readonly id: string;
readonly login: string;
readonly logout?: string;
+ readonly icon?: string;
}
/**
@@ -67,6 +68,10 @@ export interface OAuthMethod {
*/
readonly id: string;
/**
+ * Optional bas64encoded icon image url for the method
+ */
+ readonly icon?: string;
+ /**
* Determines if the current flow is active for this method
*/
isActiveLogin(): boolean
@@ -90,6 +95,10 @@ export interface SocialOauthMethod {
*/
readonly id: string
/**
+ * Optional bas64encoded icon image url for the method
+ */
+ readonly icon?: string
+ /**
* The endpoint to submit the authentication request to
*/
loginUrl(): string
@@ -214,7 +223,8 @@ export const fromSocialConnections = <T extends SocialOauthMethod>(methods: T[],
return map(methods, method => {
return{
id: method.id,
-
+ icon: method.icon,
+
async beginLoginFlow() {
//Prepare the login claim`
const claim = await prepareLogin()
@@ -314,6 +324,7 @@ export const fromSocialPortals = (portals: SocialOAuthPortal[]): SocialOauthMeth
return map(portals, p => {
return {
id: p.id,
+ icon: p.icon,
loginUrl : () => p.login,
//Get the logout data from the server
getLogoutData: () => ({ url: p.logout!, args: {}}),