Commit Graph

293 Commits

Author SHA1 Message Date
Asaf Gartner 65aab39432 Asset thumbnail backend 2023-05-17 22:34:55 +03:00
bvisness 0210a0784b Add Discord login (#106)
This leverages our existing Discord OAuth implementation. Any users with a linked Discord account will be able to log in immediately. When logging in, we request the `email` scope in addition to `identity`, so existing users will be prompted one time to accept the new permissions. On subsequent logins, Discord will skip the prompt.

When linking your Discord account to an existing HMN account, we continue to only request the `identity` scope, so we do not receive the user's Discord email.

Both login and linking go through the same Discord OAuth callback. All flows through the callback try to achieve the same end goal: a logged-in HMN user with a linked Discord account.

Linking works the same as it ever has. Login, however, is different because we do not have a session ID to use as the OAuth state. To account for this, I have added a `pending_login` table that stores a secure unique ID and the eventual destination URL. These pending logins expire after 10 minutes. When we receive the OAuth callback, we look up the pending login by the OAuth `state` and immediately delete it. The destination URL will be used to redirect the user to the right place.

If we have a `discord_user` entry for the OAuth'd Discord user, we immediately log the user into the associated HMN account. This is the typical login case. If we do not have a `discord_user`, but there is exactly one HMN user with the same email address as the Discord user, we will link the two accounts and log into the HMN account.

(It is possible for multiple HMN accounts to have the same email, because we don't have a uniqueness constraint there. We fail the login in this case rather than link to the wrong account.)

Finally, if no associated HMN user exists, a new one will be created. It will use the Discord user's username, email, and avatar. This user will have no password, but they can set or reset a password through the usual flows.

Co-authored-by: Ben Visness <bvisness@gmail.com>
Reviewed-on: #106
2023-05-06 19:38:50 +00:00
Ben Visness e4dd15d248 Add all jams index 2023-04-22 11:26:07 -05:00
Ben Visness 79c4c14631 Add jam recap (not yet shown off properly) 2023-04-21 23:11:32 -05:00
Ben Visness 23e67638e4 Merge remote-tracking branch 'origin/beta' 2023-04-14 15:47:32 -05:00
Ben Visness 89dd2c52c7 Link back to the main jam page from the feed 2023-04-14 15:46:06 -05:00
Ben Visness b7d4883c6c Make news posts look a little nicer 2023-04-13 17:53:36 -05:00
Asaf Gartner ef16a4f3e0 Fixed style and links for vis jam 2023-04-11 17:38:32 +03:00
Ben Visness 524cf8e27b Add ability to load templates live from the filesystem
See config.go.example.
2023-04-08 11:14:44 -05:00
Jake Mason 45b5c7f4d4 Updating Feed for VJ 2023 2023-04-06 14:54:14 -04:00
Jake Mason 0ccf3aba1a Add handmade cities banner v1 2023-03-24 17:38:24 -04:00
Ben Visness 81b92d3aef Add special Twitter card 2023-03-07 12:09:22 -06:00
Ben Visness 5296e0a15a Fix jam opengraph 2023-03-07 11:57:44 -06:00
Ben Visness 55f56d8ae0 Vis jam landing page 2023-03-07 11:48:13 -06:00
Ben Visness bb38d0b759 Merge remote-tracking branch 'origin/feature/2023_frontend_updates' 2023-03-07 11:40:26 -06:00
Jake Mason 4bb562823e Opengraph images, and fix day-of-week references 2023-03-05 20:40:22 -05:00
Jake Mason 526a588a19 Visualization Jam 2023 template 2023-03-04 23:52:03 -05:00
Asaf Gartner aa6428f3a4 Removed remaining pgxv4 stuff and fixed twitch tags 2023-01-29 08:53:57 +02:00
Asaf Gartner 2af28d9f3f Update pgx v4 to pgx v5 2023-01-29 08:53:57 +02:00
bvisness 348feff4cf Automatically handle HEAD requests (#104)
HEAD requests will be routed as GET requests, and Content-Type and Content-Length headers will always be sent for all requests.

Co-authored-by: Ben Visness <bvisness@gmail.com>
Reviewed-on: #104
2023-01-13 18:52:31 +00:00
Ben Visness 9b3a972e37 Rework about page, finally
Start foundation / about page work

Add some job descriptions

Add Advocacy role

Make things look barely tolerable

Cloin'd

Better About intro

no fundo

Link from manifesto

swanky changes
2022-12-14 17:49:08 -06:00
Ben Visness 5fe3e7560c A little more OpenGraph flavor 2022-11-05 16:27:55 -05:00
Ben Visness 084b13ae34 ...including the nav and stuff 2022-11-05 16:23:12 -05:00
Ben Visness f0597f3eb8 Open education up to all 2022-11-05 16:18:39 -05:00
Asaf Gartner bd1edb2077 Set education article's opengraph image to the first image in the
article
2022-11-05 18:25:01 +02:00
Ben Visness 5a983643a3 Exclude editor's notes from TOC 2022-11-02 22:40:44 -05:00
Ben Visness 2fbdf19f41 Fix the HTTP article slug 2022-10-31 16:01:42 -05:00
Ben Visness 48af5e650d Better edu home page 2022-10-27 00:20:59 -05:00
Asaf Gartner 5cc920dc2f Better twitch tracking 2022-10-20 12:43:26 +03:00
Ben Visness 968e859dde Show HMS banner 2022-10-17 20:13:58 -05:00
Ben Visness 3d7c095c87 Add entrepreneurship fishbowl title/description 2022-10-03 15:31:17 -05:00
ilidemi 8189151a74 Add entrepereuship fishbowl (#99)
Code notes:
*  MathJax treats text between two dollar signs as math. Escaped those cases in html (`\$`) - is there a way to not run mathjax on fishbowls instead?
* Limited embed image sizes to match Discord
* Fixed replies to a quote wrapping on a new line

Content notes:
* Moved intros to the top, untangled the discussions (hopefully without significant loss), pulled in audience comments
* Most book links are to Amazon as the promo websites are shitty or non-functioning
* Demetri had interesting points in -audience afterwards but they tie to Allen and may be hard to pull in without a lot of context
* Catchy title and description are TBD as usual

Co-authored-by: Ilia Demianenko <ilia.demianenko@gmail.com>
Reviewed-on: #99
Co-authored-by: ilidemi <belk94@gmail.com>
Co-committed-by: ilidemi <belk94@gmail.com>
2022-10-03 20:30:03 +00:00
Ben Visness 8121830561 Remove resources from the table of contents 2022-09-19 20:26:43 -05:00
Ben Visness b27ddd1e7f A few education improvements 2022-09-17 16:21:58 -05:00
Asaf Gartner c489d0ffa9 Consolidated shared editor-related params 2022-09-15 00:44:27 +03:00
Ben Visness 045a2c2379 Add education toggle to user admin settings 2022-09-10 16:52:02 -05:00
Ben Visness 168b210c5b Restore the library since we're not actually rolling out education yet 2022-09-10 12:54:26 -05:00
bvisness d2b34cb87d Initial version of education content (#90)
Co-authored-by: Ben Visness <bvisness@gmail.com>
Reviewed-on: #90
2022-09-10 16:29:57 +00:00
Asaf Gartner 42e1ed95fb Added logs for twitch 2022-08-29 01:18:55 +03:00
Ben Visness d7b43fdea0 Use the register destination when coming from the login page 2022-08-13 15:07:37 -05:00
Ben Visness 81d8d4559f Fix bug where Discord settings were cleared while disabled 2022-08-13 14:29:40 -05:00
Ben Visness a0cc2f5c66 Update auth flows 2022-08-13 14:15:00 -05:00
Asaf Gartner 319b1a05b9 Delete snippets when banning and prevent banned users from logging in 2022-08-09 12:57:12 +03:00
Ben Visness 48490d83a9 Some tweaks 2022-08-06 20:21:12 -05:00
Asaf Gartner 97ed892ce3 Added snippets to admin approval queue 2022-08-07 02:03:34 +03:00
Asaf Gartner 841264de0f Fix element focus issue on project creation. 2022-08-07 00:40:05 +03:00
Asaf Gartner d2f44f8e5f No jam snippets if no jam projects! 2022-08-06 05:19:49 +03:00
Asaf Gartner a9b0606b79 Use new snippet-project association for jam index showcase 2022-08-06 00:48:56 +03:00
Asaf Gartner 87a146dfa8 Fetch jam snippets by project id 2022-08-06 00:42:08 +03:00
Asaf Gartner efc7d76cb7 Snippet creation and editing 2022-08-06 00:41:37 +03:00