Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add social login #1276

Merged
merged 18 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* https://jestjs.io/docs/configuration
*/

import process from "process";

import type { Config } from "jest";

const config: Config = {
Expand All @@ -19,7 +21,7 @@ const config: Config = {
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
collectCoverage: process.env.DEV !== "true",

// An array of glob patterns indicating a set of files for which coverage information should be collected
// collectCoverageFrom: undefined,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"preview": "vite preview",
"electron:package:linux": "electron-builder -l",
"electron:package:mac": "electron-builder -m",
"electron:package:mac:debug": "yarn electron:package:mac -c electron-builder.dev.yml",
"electron:package:mac:debug": "DEBUG=true yarn build && sed -i='' 's@devTools: false@devTools: true@g' build/electron.js && yarn electron:package:mac -c electron-builder.dev.yml && rm -rf build",
"electron:package:win": "electron-builder -w",
"electron:start": "electronmon .",
"docs": "typedoc --tsconfig tsconfig.e2e.json",
Expand All @@ -27,7 +27,7 @@
"lint:ci": "eslint src --ext .js,.jsx,.ts,.tsx --max-warnings=0",
"lint": "eslint src --ext .js,.jsx,.ts,.tsx --fix",
"test": "cross-env TZ=CET jest",
"test:watch": "yarn test --watch",
"test:watch": "cross-env DEV=true yarn test --watch",
"test:e2e": "cross-env TS_NODE_PROJECT=tsconfig.e2e.json cucumber-js",
"test:e2e:focus": "yarn test:e2e --tags='@focus'",
"theme:watch": "chakra-cli tokens src/style/theme.ts --watch",
Expand Down Expand Up @@ -68,7 +68,7 @@
"@testing-library/jest-dom": "6.4.5",
"@testing-library/react": "14.3.0",
"@testing-library/user-event": "14.5.2",
"@toruslabs/customauth": "^15.0.5",
"@toruslabs/customauth": "^16.0.6",
"@types/babel__core": "^7",
"@types/babel__preset-env": "^7",
"@types/identity-obj-proxy": "^3",
Expand Down
39 changes: 0 additions & 39 deletions src/GoogleAuth/GoogleAuth.test.tsx

This file was deleted.

47 changes: 0 additions & 47 deletions src/GoogleAuth/GoogleAuth.tsx

This file was deleted.

49 changes: 0 additions & 49 deletions src/GoogleAuth/getGoogleCredentials.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/GoogleAuth/index.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/GoogleAuth/parseTorusRedirectParams.test.ts

This file was deleted.

61 changes: 0 additions & 61 deletions src/GoogleAuth/parseTorusRedirectParams.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const SliderItems: Item[] = [
</Text>
</>
),
icon: <KeyIcon width="32px" height="32px" stroke={colors.gray[450]} strokeWidth="0.9" />,
icon: <KeyIcon width="32px" height="32px" strokeWidth="0.9" />,
image: MultisigImage,
},
{
Expand Down
20 changes: 20 additions & 0 deletions src/assets/icons/Email.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Icon, IconProps } from "@chakra-ui/react";

export const EmailIcon: React.FC<IconProps> = props => (
<Icon
width="28px"
height="28px"
fill="black"
data-testid="email-icon"
viewBox="0 0 28 28"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M23.332 4.66602H4.66536C3.38203 4.66602 2.3437 5.71602 2.3437 6.99935L2.33203 20.9993C2.33203
22.2827 3.38203 23.3327 4.66536 23.3327H23.332C24.6154 23.3327 25.6654 22.2827 25.6654
20.9993V6.99935C25.6654 5.71602 24.6154 4.66602 23.332 4.66602ZM23.332 9.33268L13.9987
15.166L4.66536 9.33268V6.99935L13.9987 12.8327L23.332 6.99935V9.33268Z"
/>
</Icon>
);
26 changes: 26 additions & 0 deletions src/assets/icons/Facebook.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Icon, IconProps } from "@chakra-ui/react";

export const FacebookIcon: React.FC<IconProps> = props => (
<Icon
width="28px"
height="28px"
fill="none"
data-testid="facebook-icon"
viewBox="0 0 28 28"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M28 14.0856C28 6.30633 21.732 0 14 0C6.26801 0 0 6.30633 0 14.0856C0 21.1161 5.1196 26.9434 11.8125 28V18.1572H8.25781V14.0856H11.8125V10.9824C11.8125 7.45215 13.9026 5.50218 17.1005 5.50218C18.6322 5.50218 20.2344 5.77729 20.2344 5.77729V9.24367H18.469C16.7299 9.24367 16.1875 10.3294 16.1875 11.4434V14.0856H20.0703L19.4496 18.1572H16.1875V28C22.8804 26.9434 28 21.1161 28 14.0856Z"
fill="#1977F2"
clipRule="evenodd"
fillRule="evenodd"
/>
<path
d="M19.4496 18.0469L20.0703 14H16.1875V11.3738C16.1875 10.2667 16.7299 9.1875 18.469 9.1875H20.2344V5.74219C20.2344 5.74219 18.6322 5.46875 17.1005 5.46875C13.9026 5.46875 11.8125 7.40687 11.8125 10.9156V14H8.25781V18.0469H11.8125V27.8299C13.262 28.0567 14.738 28.0567 16.1875 27.8299V18.0469H19.4496Z"
fill="white"
clipRule="evenodd"
fillRule="evenodd"
/>
</Icon>
);
1 change: 1 addition & 0 deletions src/assets/icons/Google.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const GoogleIcon: React.FC<IconProps> = props => (
width="24px"
height="24px"
fill="none"
data-testid="google-icon"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
{...props}
Expand Down
3 changes: 3 additions & 0 deletions src/assets/icons/Key.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Icon, IconProps } from "@chakra-ui/react";

import colors from "../../style/colors";

export const KeyIcon: React.FC<IconProps> = props => (
<Icon
width="18px"
height="18px"
fill="none"
stroke={colors.gray[450]}
data-testid="key-icon"
strokeWidth="1.2"
viewBox="0 0 18 18"
Expand Down
22 changes: 22 additions & 0 deletions src/assets/icons/Reddit.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Icon, IconProps } from "@chakra-ui/react";

export const RedditIcon: React.FC<IconProps> = props => (
<Icon
width="24px"
height="24px"
fill="none"
data-testid="reddit-icon"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
d="M12 0C5.37281 0 0 5.37281 0 12C0 15.3141 1.34344 18.3141 3.51469 20.4853L1.22906 22.7709C0.775312 23.2247 1.09688 24 1.73813 24H12C18.6272 24 24 18.6272 24 12C24 5.37281 18.6272 0 12 0Z"
fill="#FF4500"
/>
<path
d="M14.4414 5.65922C14.6495 6.54141 15.4417 7.19859 16.3877 7.19859C17.492 7.19859 18.3873 6.30328 18.3873 5.19891C18.3873 4.09453 17.492 3.19922 16.3877 3.19922C15.422 3.19922 14.6167 3.88359 14.4292 4.79391C12.812 4.96734 11.5492 6.33891 11.5492 8.00109C11.5492 8.00484 11.5492 8.00766 11.5492 8.01141C9.79047 8.08547 8.18453 8.58609 6.90953 9.37641C6.43609 9.00984 5.84172 8.79141 5.19672 8.79141C3.64891 8.79141 2.39453 10.0458 2.39453 11.5936C2.39453 12.7167 3.05453 13.6842 4.00797 14.1314C4.10078 17.3845 7.64547 20.0011 12.0058 20.0011C16.3661 20.0011 19.9155 17.3817 20.0036 14.1258C20.9495 13.6758 21.6039 12.7111 21.6039 11.5945C21.6039 10.0467 20.3495 8.79234 18.8017 8.79234C18.1595 8.79234 17.568 9.00891 17.0955 9.37266C15.8092 8.57672 14.1855 8.07609 12.4089 8.00953C12.4089 8.00672 12.4089 8.00484 12.4089 8.00203C12.4089 6.81141 13.2939 5.82328 14.4414 5.66109V5.65922ZM6.79703 13.372C6.84391 12.3558 7.51891 11.5758 8.30359 11.5758C9.08828 11.5758 9.68828 12.3998 9.64141 13.4161C9.59453 14.4323 9.00859 14.8017 8.22297 14.8017C7.43734 14.8017 6.75016 14.3883 6.79703 13.372ZM15.7089 11.5758C16.4945 11.5758 17.1695 12.3558 17.2155 13.372C17.2623 14.3883 16.5742 14.8017 15.7895 14.8017C15.0048 14.8017 14.418 14.4333 14.3711 13.4161C14.3242 12.3998 14.9233 11.5758 15.7089 11.5758ZM14.7752 15.7233C14.9223 15.7383 15.0161 15.8911 14.9589 16.028C14.4761 17.182 13.3361 17.993 12.0058 17.993C10.6755 17.993 9.53641 17.182 9.05266 16.028C8.99547 15.8911 9.08922 15.7383 9.23641 15.7233C10.0989 15.6361 11.0317 15.5883 12.0058 15.5883C12.9798 15.5883 13.9117 15.6361 14.7752 15.7233Z"
fill="white"
/>
</Icon>
);
Loading
Loading