-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add ability to auto verify and auto login in test env
- Loading branch information
1 parent
34fc89c
commit 321a2ec
Showing
6 changed files
with
52 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
DATABASE_URL="postgresql://codellm:password@localhost:5432/codellm?schema=public" | ||
|
||
AUTH0_CALLBACK_URL="http://localhost:3000/callback" | ||
AUTH0_CLIENT_ID="your_client_id_here" | ||
AUTH0_CLIENT_SECRET="your_client_secret_here" | ||
AUTH0_DOMAIN="your_domain_here" | ||
AUTH0_LOGOUT_URL="https://your_domain_here/v2/logout" | ||
|
||
# Set to "true" to automatically verify users when they # | ||
USER_AUTO_VERIFY="true" | ||
|
||
# Set to "true" to automatically log in the mock user | ||
USER_AUTO_LOGIN="true" |
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
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,15 +1,7 @@ | ||
import type { ActionFunctionArgs } from '@remix-run/node'; | ||
import { redirect } from '@remix-run/node'; | ||
|
||
import { getLogoutOptions, getLogoutURL } from '@remix/.server/services/auth'; | ||
import { isError } from '@remix/.server/errors'; | ||
import { logout } from '@remix/.server/services/auth'; | ||
|
||
export const action = async ({ request }: ActionFunctionArgs) => { | ||
const logoutUrl = getLogoutURL({ request, returnToPath: '/' }); | ||
const logoutOptions = await getLogoutOptions({ request }); | ||
if (isError(logoutOptions)) { | ||
return redirect('/'); | ||
} | ||
|
||
throw redirect(logoutUrl, logoutOptions); | ||
export const action = async (params: ActionFunctionArgs) => { | ||
return logout(params); | ||
}; |
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