Skip to content

Commit

Permalink
Add support for Slack OAuth provider
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke committed Jan 24, 2024
1 parent f2befd6 commit 5eb694c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
46 changes: 46 additions & 0 deletions shared/studio/tabs/auth/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,49 @@ export function GoogleIcon() {
</svg>
);
}

export function SlackIcon() {
return (
<svg
className={styles.oauthIcon}
width="32"
height="32"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M8.46254 19.43C8.46254 20.9332 7.23453 22.1612 5.73127 22.1612C4.22801 22.1612 3 20.9332 3 19.43C3 17.9267 4.22801 16.6987 5.73127 16.6987H8.46254V19.43Z"
fill="#E01E5A"
/>
<path
d="M9.83875 19.43C9.83875 17.9267 11.0668 16.6987 12.57 16.6987C14.0733 16.6987 15.3013 17.9267 15.3013 19.43V26.2687C15.3013 27.772 14.0733 29 12.57 29C11.0668 29 9.83875 27.772 9.83875 26.2687V19.43Z"
fill="#E01E5A"
/>
<path
d="M12.57 8.46254C11.0668 8.46254 9.83875 7.23453 9.83875 5.73127C9.83875 4.22801 11.0668 3 12.57 3C14.0733 3 15.3013 4.22801 15.3013 5.73127V8.46254H12.57Z"
fill="#36C5F0"
/>
<path
d="M12.57 9.83881C14.0733 9.83881 15.3013 11.0668 15.3013 12.5701C15.3013 14.0733 14.0733 15.3013 12.57 15.3013H5.73127C4.22801 15.3013 3 14.0733 3 12.5701C3 11.0668 4.22801 9.83881 5.73127 9.83881H12.57Z"
fill="#36C5F0"
/>
<path
d="M23.5375 12.5701C23.5375 11.0668 24.7655 9.83881 26.2688 9.83881C27.772 9.83881 29 11.0668 29 12.5701C29 14.0733 27.772 15.3013 26.2688 15.3013H23.5375V12.5701Z"
fill="#2EB67D"
/>
<path
d="M22.1612 12.57C22.1612 14.0733 20.9332 15.3013 19.43 15.3013C17.9267 15.3013 16.6987 14.0733 16.6987 12.57V5.73127C16.6987 4.22801 17.9267 3 19.43 3C20.9332 3 22.1612 4.22801 22.1612 5.73127V12.57Z"
fill="#2EB67D"
/>
<path
d="M19.4299 23.5374C20.9332 23.5374 22.1612 24.7654 22.1612 26.2686C22.1612 27.7719 20.9332 28.9999 19.4299 28.9999C17.9267 28.9999 16.6987 27.7719 16.6987 26.2686V23.5374H19.4299Z"
fill="#ECB22E"
/>
<path
d="M19.4299 22.1612C17.9267 22.1612 16.6987 20.9332 16.6987 19.43C16.6987 17.9267 17.9267 16.6987 19.4299 16.6987H26.2687C27.772 16.6987 29 17.9267 29 19.43C29 20.9332 27.772 22.1612 26.2687 22.1612H19.4299Z"
fill="#ECB22E"
/>
</svg>
);
}
9 changes: 8 additions & 1 deletion shared/studio/tabs/auth/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
DiscordIcon,
GithubIcon,
GoogleIcon,
SlackIcon,
} from "../icons";

export interface AuthConfigData {
Expand All @@ -30,7 +31,8 @@ export type OAuthProviderData = {
| "ext::auth::AzureOAuthProvider"
| "ext::auth::DiscordOAuthProvider"
| "ext::auth::GitHubOAuthProvider"
| "ext::auth::GoogleOAuthProvider";
| "ext::auth::GoogleOAuthProvider"
| "ext::auth::SlackOAuthProvider";
client_id: string;
additional_scope: string;
};
Expand Down Expand Up @@ -108,6 +110,11 @@ export const _providersInfo: {
displayName: "Google",
icon: <GoogleIcon />,
},
"ext::auth::SlackOAuthProvider": {
kind: "OAuth",
displayName: "Slack",
icon: <SlackIcon />,
},
// local
"ext::auth::EmailPasswordProviderConfig": {
kind: "Local",
Expand Down

0 comments on commit 5eb694c

Please sign in to comment.