Skip to content

Commit

Permalink
feat: redirect on oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
sdrejkarz committed May 21, 2024
1 parent 3536627 commit edac575
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useCallback } from 'react';
import { apiURL } from '../helpers';
import { OAuthProvider } from './auth.types';

export const getOauthUrl = (provider: OAuthProvider, locale?: string) =>
apiURL(`/auth/social/login/${provider}?next=${encodeURIComponent(window.location.origin)}&locale=${locale ?? 'en'}`);
export const getOauthUrl = (provider: OAuthProvider, locale = 'en') =>
apiURL(`/auth/social/login/${provider}?next=${encodeURIComponent(window.location.href)}&locale=${locale}`);

export const useOAuthLogin = () => {
const {
Expand Down

0 comments on commit edac575

Please sign in to comment.