Skip to content

Instantly share code, notes, and snippets.

View michaelkremenetsky's full-sized avatar

Michael Kremenetsky michaelkremenetsky

View GitHub Profile
@michaelkremenetsky
michaelkremenetsky / auth.ts
Last active February 8, 2024 08:23
Supabase Auth Hook
import { Alert } from "react-native";
import * as WebBrowser from "expo-web-browser";
import { useSupabaseClient } from "@supabase/auth-helpers-react";
import { initiateAppleSignIn } from "../utils/auth";
export const useAuth = () => {
const Supabase = useSupabaseClient();
const signInWithPassword = async (
@michaelkremenetsky
michaelkremenetsky / auth.ts
Created October 15, 2023 18:02
Expo apple auth
import {
AppleAuthenticationScope,
signInAsync,
} from "expo-apple-authentication";
import {
CryptoDigestAlgorithm,
digestStringAsync,
randomUUID,
} from "expo-crypto";