Skip to content
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
39 changes: 22 additions & 17 deletions apps/docs/components/icons.tsx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions apps/sim/app/(auth)/components/social-login-buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ export function SocialLoginButtons({
const googleButton = (
<Chip
fullWidth
leftIcon={GoogleIcon}
leftAdornment={<GoogleIcon className='size-[20px] shrink-0' />}
className={cn(AUTH_BUTTON_CLASS, 'border border-[var(--border-1)]')}
disabled={!googleAvailable || isGoogleLoading}
onClick={signInWithGoogle}
>
{isGoogleLoading ? 'Connecting…' : 'Google'}
{isGoogleLoading ? 'Connecting…' : 'Continue with Google'}
</Chip>
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export function AuthModal({ children, defaultView = 'login', source }: AuthModal
disabled={!!socialLoading}
className={SOCIAL_BTN}
>
<GoogleIcon className='absolute left-4 size-[18px] shrink-0' />
<GoogleIcon className='absolute left-4 size-[20px] shrink-0' />
<span>
{socialLoading === 'google' ? 'Connecting...' : 'Continue with Google'}
</span>
Expand Down
39 changes: 22 additions & 17 deletions apps/sim/components/icons.tsx

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion apps/sim/lib/oauth/oauth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ beforeAll(() => {

afterAll(resetEnvMock)

import { GoogleIcon, GoogleVaultIcon } from '@/components/icons'
import { DEFAULT_MAX_ERROR_BODY_BYTES } from '@/lib/core/utils/stream-limits'
import { refreshOAuthToken } from '@/lib/oauth'
import { OAUTH_PROVIDERS, refreshOAuthToken } from '@/lib/oauth'
import { REDDIT_USER_AGENT } from '@/tools/reddit/constants'

/**
Expand All @@ -90,6 +91,15 @@ function withMockFetch<T>(mockFetch: ReturnType<typeof vi.fn>, fn: () => Promise
})
}

describe('OAuth Provider Branding', () => {
it('should use the Google Vault product icon and Google base-provider icon', () => {
const googleVault = OAUTH_PROVIDERS.google.services['google-vault']

expect(googleVault.icon).toBe(GoogleVaultIcon)
expect(googleVault.baseProviderIcon).toBe(GoogleIcon)
})
})

describe('OAuth Token Refresh', () => {
describe('Basic Auth Providers', () => {
const basicAuthProviders = [
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/lib/oauth/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
GoogleMeetIcon,
GoogleSheetsIcon,
GoogleTasksIcon,
GoogleVaultIcon,
HubspotIcon,
InstagramIcon,
JiraIcon,
Expand Down Expand Up @@ -255,7 +256,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
name: 'Google Vault',
description: 'Search, export, and manage matters/holds via Google Vault.',
providerId: 'google-vault',
icon: GoogleIcon,
icon: GoogleVaultIcon,
baseProviderIcon: GoogleIcon,
scopes: [
'https://www.googleapis.com/auth/userinfo.email',
Expand Down
Loading