Skip to content

Instantly share code, notes, and snippets.

View j4crev's full-sized avatar

Jason Creviston j4crev

  • home
  • Indiana, US
  • 02:24 (UTC -04:00)
  • X @j4crev
View GitHub Profile
@j4crev
j4crev / implement-user-api-keys-with-supabase.md
Last active August 11, 2026 01:54
Implement user API keys with Supabase

Implement user API keys with Supabase

!!!!! THIS GIST SHOULD BE CONSIDERED DEPRECATED.

This is pretty much my first crack at this. I'm sure things could be improved or done differently.

Rationale

JWTs are at the heart of Supabase authorization, but sometimes we wanna build an app that also gives users access via API keys; or perhaps only exclusively via API keys. As you may know, using JWTs as API keys makes them difficult to revoke and therefore a security issue.

We also want to ensure this doesn't significantly add to RLS polices, if at all.

@mlent
mlent / social-sharing-buttons.html
Last active February 24, 2023 08:22
Social sharing buttons
<ul>
<li>
<a href="https://twitter.com/share?text=TITLE OF YOUR POST via @YOUR_USERNAME&url=HTTPS://YOUR_WEBSITE.COM" onclick="window.open(this.href, 'twitter-share', 'width=550,height=235'); return false;">
Share on Twitter
</a>
</li>
<li>
<a href="https://news.ycombinator.com/submitlink?u=HTTP://YOUR_URL.COM&t=YOUR CONTENT" onclick="window.open(this.href, 'hn-share', 'width=550,height=350'); return false;">
Share on Hacker News
</a>