Skip to content

Commit

Permalink
[feat] Support Linkedin login via Bridgekeeper (#317)
Browse files Browse the repository at this point in the history
* add support to linkedin login
  • Loading branch information
phaneendraandukuri authored Oct 11, 2021
1 parent 6cb3817 commit 7817d89
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 74 deletions.
4 changes: 4 additions & 0 deletions app/assets/icons/linkedin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions app/isomorphic/components/molecules/SocialLogin/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import { func, string } from "prop-types";
import { withFacebookLogin, withGoogleLogin, withAppleLogin } from "@quintype/bridgekeeper-js";
import { withFacebookLogin, withGoogleLogin, withAppleLogin, withLinkedinLogin } from "@quintype/bridgekeeper-js";
import { connect, useSelector } from "react-redux";
import { parseUrl } from "query-string";
import get from "lodash/get";
Expand Down Expand Up @@ -37,12 +37,28 @@ export const SocialLoginBase = ({ googleAppId, facebookAppId }) => {
<Button color="#3b5998" flat href={serverSideLoginPath} socialButton>
<span styleName="icon">
<SvgIconHandler type="facebook" iconStyle={{ color: "#3b5998" }} width="9" height="15" viewBox="0 0 12 21" />
</span>{" "}
</span>
Facebook
</Button>
);
};

const LinkedinLogin = () => {
const { serverSideLoginPath } = withLinkedinLogin({
scope: "email",
emailMandatory: true,
redirectUrl: encodeURIComponent(redirectUrl)
});
return (
<Button color="#dd4b39" flat href={serverSideLoginPath} socialButton>
<span styleName="icon">
<SvgIconHandler type="linkedin" iconStyle={{ color: "#3b5998" }} width="30" height="30" viewBox="0 0 15 20" />
</span>{" "}
LinkedIn
</Button>
);
};

const GoogleLogin = () => {
const { serverSideLoginPath } = withGoogleLogin({
scope: "email",
Expand Down Expand Up @@ -81,6 +97,9 @@ export const SocialLoginBase = ({ googleAppId, facebookAppId }) => {
<li styleName="button">
<AppleLogin />
</li>
<li styleName="button">
<LinkedinLogin />
</li>
</ul>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
flex-wrap: wrap;
}
.button {
min-width: 110px;
display: flex;
font-weight: bold;
justify-content: center;
Expand Down
2 changes: 1 addition & 1 deletion config/publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ publisher:
is_enable: true
redirect_Url: "<Domain>/auth/v1/oauth/token"
callback_Url: "Callback Url"
client_id : "Integration-id (number)"
client_id: "Integration-id (number)"
subdomain:
voices:
redirect_Url: "<Domain>/api/auth/v1/oauth/token"
Expand Down
Loading

0 comments on commit 7817d89

Please sign in to comment.