File tree Expand file tree Collapse file tree 4 files changed +20
-16
lines changed
Expand file tree Collapse file tree 4 files changed +20
-16
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11"use client" ;
2- import Image from "next/image" ;
32import { toast } from "sonner" ;
3+ import { OktaIcon } from "@/components/brand-icons" ;
44import { Button } from "@/components/ui/button" ;
55import { authClient } from "@/lib/auth/auth-client" ;
66
77export function SignInButton ( { providerId } : { providerId : string } ) {
8- const isOktaProvider = providerId === "okta" ;
8+ const isOktaProvider = providerId === "okta" || providerId === "oidc" ;
99 const providerName = providerId . charAt ( 0 ) . toUpperCase ( ) + providerId . slice ( 1 ) ;
1010
1111 const handleOIDCSignIn = async ( ) => {
@@ -39,15 +39,7 @@ export function SignInButton({ providerId }: { providerId: string }) {
3939 className = "w-full h-9 gap-2"
4040 size = "default"
4141 >
42- { isOktaProvider && (
43- < Image
44- src = "/okta-icon.svg"
45- alt = { providerName }
46- width = { 16 }
47- height = { 16 }
48- className = "shrink-0"
49- />
50- ) }
42+ { isOktaProvider && < OktaIcon className = "size-4 shrink-0" /> }
5143 < span > { providerName } </ span >
5244 </ Button >
5345 ) ;
Original file line number Diff line number Diff line change 1+ export { OktaIcon } from "./okta-icon" ;
Original file line number Diff line number Diff line change 1+ import type { SVGProps } from "react" ;
2+
3+ export const OktaIcon = ( props : SVGProps < SVGSVGElement > ) => (
4+ < svg
5+ xmlns = "http://www.w3.org/2000/svg"
6+ fill = "none"
7+ viewBox = "0 0 16 16"
8+ aria-hidden = "true"
9+ { ...props }
10+ >
11+ < path
12+ fill = "currentColor"
13+ d = "m8.803.111-.33 4.053a4.1 4.1 0 0 0-1.058.018l-.187-1.964a.11.11 0 0 1 .107-.116h.334L7.509.116C7.504.053 7.553 0 7.61 0H8.7c.062 0 .11.053.102.116zm-2.749.2C6.036.253 5.974.218 5.916.24L4.893.613c-.057.023-.084.09-.057.143l.831 1.813-.315.115a.104.104 0 0 0-.058.143l.85 1.782c.306-.169.64-.298.991-.378L6.059.311zM3.546 1.44l2.353 3.316c-.298.195-.57.426-.801.693l-1.41-1.387a.107.107 0 0 1 .005-.155l.258-.214L2.55 2.276a.104.104 0 0 1 .009-.156l.831-.698a.103.103 0 0 1 .151.018zM1.57 3.36c-.049-.036-.12-.018-.151.036l-.543.942a.105.105 0 0 0 .045.146l1.806.854-.17.289a.102.102 0 0 0 .05.146l1.796.823c.13-.334.303-.645.516-.925zM.241 5.92c.01-.062.072-.098.13-.084l3.935 1.026a3.9 3.9 0 0 0-.169 1.05l-1.97-.16a.103.103 0 0 1-.093-.125l.058-.33-1.988-.186C.08 7.107.04 7.05.05 6.987l.187-1.071zM.095 8.578c-.063.004-.103.062-.094.124l.191 1.071c.01.063.072.098.13.085l1.93-.502.057.328c.01.063.072.098.13.085l1.903-.525a3.9 3.9 0 0 1-.2-1.04L.09 8.578zm.631 2.818a.105.105 0 0 1 .045-.147l3.673-1.742c.138.329.325.635.547.91l-1.61 1.147a.105.105 0 0 1-.15-.03l-.17-.294-1.641 1.133c-.049.036-.12.018-.151-.035l-.547-.942zm4.452-.765-2.86 2.893a.104.104 0 0 0 .01.156l.835.698c.05.04.116.03.152-.018l1.156-1.627.258.218c.049.04.12.031.156-.022l1.12-1.627a4 4 0 0 1-.822-.67zm-.565 4.645a.104.104 0 0 1-.058-.143l1.695-3.697c.311.16.65.28 1 .346l-.498 1.911a.105.105 0 0 1-.137.071l-.316-.115-.53 1.924c-.017.058-.08.094-.137.071l-1.023-.373zm2.918-3.445-.33 4.053c-.004.063.045.116.103.116h1.09a.102.102 0 0 0 .102-.116l-.16-1.986h.333a.11.11 0 0 0 .107-.116l-.187-1.964a3.7 3.7 0 0 1-1.058.013M11.454.858a.103.103 0 0 0-.058-.142L10.373.342c-.058-.022-.12.014-.138.071l-.53 1.925-.315-.116c-.058-.022-.12.014-.138.071l-.498 1.911c.356.072.69.192 1 .347zm2.232 1.613-2.86 2.893a3.9 3.9 0 0 0-.822-.67l1.12-1.627a.11.11 0 0 1 .156-.023l.258.218 1.156-1.626a.103.103 0 0 1 .151-.018l.837.698c.049.04.049.11.008.155zm1.548 2.276a.102.102 0 0 0 .044-.147l-.547-.942a.11.11 0 0 0-.151-.036l-1.641 1.134-.17-.29c-.03-.053-.101-.07-.15-.03l-1.61 1.146q.333.416.547.911l3.673-1.742zm.578 1.475.187 1.071a.107.107 0 0 1-.094.125l-4.051.378a3.8 3.8 0 0 0-.2-1.04l1.903-.525a.102.102 0 0 1 .13.085l.057.328 1.93-.502c.058-.013.12.022.13.085zm-.182 3.934c.057.013.12-.023.129-.085L15.945 9a.107.107 0 0 0-.093-.124l-1.988-.187.058-.329a.107.107 0 0 0-.094-.124l-1.97-.16a3.9 3.9 0 0 1-.169 1.048l3.936 1.027zM14.58 12.6a.11.11 0 0 1-.151.036l-3.35-2.312q.322-.421.517-.924l1.797.822c.057.027.08.094.048.147l-.168.289 1.805.853a.105.105 0 0 1 .045.147zm-4.479-1.364 2.353 3.315a.103.103 0 0 0 .151.018l.832-.698a.11.11 0 0 0 .009-.155l-1.401-1.418.258-.214a.104.104 0 0 0 .004-.155l-1.41-1.387a3.8 3.8 0 0 1-.8.694zm-.022 4.515c-.058.022-.12-.013-.138-.071l-1.076-3.92c.351-.08.685-.209.992-.378l.85 1.782c.026.058 0 .125-.059.143l-.315.115.831 1.814c.027.057 0 .12-.057.142l-1.023.373z"
14+ />
15+ </ svg >
16+ ) ;
You can’t perform that action at this time.
0 commit comments