updated instructions and now it should work
This commit is contained in:
parent
e85e210ad6
commit
0ec606f64f
5 changed files with 15 additions and 11 deletions
|
|
@ -3,9 +3,9 @@
|
|||
# https://app.supabase.com/project/_/settings/api
|
||||
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
|
||||
NEXT_PUBLIC_SUPABASE_ANON_KEY=<YOUR_SUPABASE_ANON_KEY>
|
||||
JWT_SECRET_KEY=<YOUR_JWT_SECRET_KEY>
|
||||
JWT_SECRET_KEY=super-secret-jwt-token-with-at-least-32-characters-long
|
||||
|
||||
# Encryption key for E2E encryption of API keys
|
||||
# (Optional) Encryption key for E2E encryption of API keys
|
||||
# You can generate a random key with `openssl rand -base64 32`
|
||||
ENCRYPTION_KEY=<YOUR_ENCRYPTION_KEY>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { useRef } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { useCallback } from "react";
|
||||
|
||||
export default function YoutubeDemo() {
|
||||
|
||||
interface YoutubeDemoProps {
|
||||
caption: string;
|
||||
}
|
||||
|
||||
|
||||
export default function YoutubeDemo({ caption }: YoutubeDemoProps) {
|
||||
return <div className="w-full max-w-3xl mx-auto">
|
||||
<div className="relative" style={{ paddingBottom: '56.25%' }}>
|
||||
<iframe
|
||||
|
|
@ -16,6 +18,6 @@ export default function YoutubeDemo() {
|
|||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
<p className="text-center text-gray-600 mt-4 text-lg">Watch the Elato Demo</p>
|
||||
<p className="text-center text-gray-600 mt-4 text-lg">{caption}</p>
|
||||
</div>
|
||||
}
|
||||
BIN
frontend-nextjs/public/.DS_Store
vendored
BIN
frontend-nextjs/public/.DS_Store
vendored
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
|||
# Supabase keys
|
||||
SUPABASE_URL=<SUPABASE_URL>
|
||||
SUPABASE_URL=http://127.0.0.1:54321
|
||||
SUPABASE_KEY=<SUPABASE_KEY>
|
||||
JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long
|
||||
|
||||
|
|
|
|||
|
|
@ -10,15 +10,17 @@ export const authenticateUser = async (
|
|||
): Promise<IUser> => {
|
||||
try {
|
||||
const jwtSecret = Deno.env.get("JWT_SECRET");
|
||||
console.log("jwtSecret", jwtSecret);
|
||||
|
||||
if (!jwtSecret) throw new Error("JWT_SECRET not configured");
|
||||
|
||||
console.log("jwtSecret", jwtSecret);
|
||||
const secretBytes = new TextEncoder().encode(jwtSecret);
|
||||
console.log("secretBytes", secretBytes);
|
||||
const payload = await jose.jwtVerify(authToken, secretBytes);
|
||||
console.log("payload", payload);
|
||||
|
||||
const { payload: { email } } = payload;
|
||||
const user = await getUserByEmail(supabaseClient, email as string);
|
||||
console.log("user", user);
|
||||
return user;
|
||||
} catch (error: any) {
|
||||
throw new Error(error.message || "Failed to authenticate user");
|
||||
|
|
|
|||
Loading…
Reference in a new issue