-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from rmarscher/lucia-auth
Update to lucia v3, oslo, arctic
- Loading branch information
Showing
51 changed files
with
3,017 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import 'expo-router/entry' | ||
import { LogBox } from 'react-native' | ||
console.disableYellowBox = true | ||
LogBox.ignoreAllLogs() | ||
import "react-native-url-polyfill/auto"; | ||
// ^^ Remove after upgrade to Expo v50 | ||
// https://github.com/expo/expo/pull/24941 | ||
import "expo-router/entry"; | ||
import { LogBox } from "react-native"; | ||
console.disableYellowBox = true; | ||
LogBox.ignoreAllLogs(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { OAuthSignInScreen } from 'app/features/oauth/screen' | ||
import Head from 'next/head' | ||
|
||
export default function Page() { | ||
return ( | ||
<> | ||
<Head> | ||
<title>OAuth Sign In</title> | ||
</Head> | ||
<OAuthSignInScreen /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import type { Config } from 'drizzle-kit' | ||
import { defineConfig } from 'drizzle-kit/utils' | ||
|
||
export default { | ||
schema: './src/db/schema.ts', | ||
out: './migrations', | ||
export default defineConfig({ | ||
driver: 'd1', | ||
dbCredentials: { | ||
wranglerConfigPath: 'wrangler.toml', | ||
dbName: 'production', | ||
}, | ||
verbose: false, | ||
schema: './src/db/schema.ts', | ||
out: './migrations', | ||
verbose: true, | ||
strict: true, | ||
} satisfies Config | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
CREATE TABLE `AuthMethod` ( | ||
`id` text PRIMARY KEY NOT NULL, | ||
`user_id` text NOT NULL, | ||
`hashed_password` text, | ||
`hash_method` text, | ||
`created_at` text DEFAULT CURRENT_TIMESTAMP, | ||
FOREIGN KEY (`user_id`) REFERENCES `User`(`id`) ON UPDATE no action ON DELETE no action | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `Session` ( | ||
`id` text PRIMARY KEY NOT NULL, | ||
`user_id` text NOT NULL, | ||
`expires_at` integer NOT NULL, | ||
FOREIGN KEY (`user_id`) REFERENCES `User`(`id`) ON UPDATE no action ON DELETE no action | ||
); | ||
--> statement-breakpoint | ||
CREATE TABLE `VerificationCode` ( | ||
`id` text PRIMARY KEY NOT NULL, | ||
`user_id` text NOT NULL, | ||
`code` text NOT NULL, | ||
`expires` integer NOT NULL, | ||
`timeout_until` integer, | ||
`timeout_seconds` integer DEFAULT 0 NOT NULL, | ||
FOREIGN KEY (`user_id`) REFERENCES `User`(`id`) ON UPDATE no action ON DELETE no action | ||
); | ||
--> statement-breakpoint | ||
CREATE INDEX `idx_userKey_userId` ON `AuthMethod` (`user_id`);--> statement-breakpoint | ||
CREATE INDEX `idx_session_userId` ON `Session` (`user_id`);--> statement-breakpoint | ||
CREATE UNIQUE INDEX `VerificationCode_user_id_unique` ON `VerificationCode` (`user_id`);--> statement-breakpoint | ||
CREATE INDEX `idx_verificationCode_userId` ON `VerificationCode` (`user_id`); |
Oops, something went wrong.