Files
blitzkit/packages/core/src/patreon/patreonLoginUrl.ts
T

12 lines
403 B
TypeScript
Raw Normal View History

2024-09-06 21:45:58 -05:00
import { assertSecret } from '../blitzkit/assertSecret';
2024-08-27 14:40:43 -05:00
2024-06-15 13:16:12 -05:00
export function patreonLoginUrl() {
const params = new URLSearchParams({
response_type: 'code',
2024-09-15 16:20:11 -05:00
client_id: assertSecret(import.meta.env.PUBLIC_PATREON_CLIENT_ID),
redirect_uri: assertSecret(import.meta.env.PUBLIC_PATREON_REDIRECT_URI),
2024-06-15 13:16:12 -05:00
scope: 'identity',
});
return `https://www.patreon.com/oauth2/authorize?${params}`;
}