added more support for supabase-js
This commit is contained in:
13
tests/integration/generate_keys.test.ts
Normal file
13
tests/integration/generate_keys.test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
import { describe, it } from 'vitest';
|
||||
import jwt from 'jsonwebtoken';
|
||||
|
||||
describe('Generate Keys', () => {
|
||||
it('should generate keys', () => {
|
||||
const secret = 'testsecret';
|
||||
const anon = jwt.sign({ role: 'anon', iss: 'madbase' }, secret, { algorithm: 'HS256' });
|
||||
const service = jwt.sign({ role: 'service_role', iss: 'madbase' }, secret, { algorithm: 'HS256' });
|
||||
console.log(`ANON_KEY=${anon}`);
|
||||
console.log(`SERVICE_KEY=${service}`);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user