{"repo":"Darkness4/auth-htmx","free":true,"listed":false,"github":"https://github.com/Darkness4/auth-htmx","clone":"git clone https://github.com/Darkness4/auth-htmx.git","description":"Experiment with Go + HTMX and OAuth2/OIDC + WebAuthn","language":"Go","stars":106,"topics":["go","htmx","oauth2","sql","ssr","oidc","webauthn"],"license":"Apache-2.0","category":"auth-billing-email","readme_excerpt":"Go + HTMX + OAuth2/OIDC + WebAuthn A very simple example HTMX with OAuth2 with: - Go HTML templating engine. - HTMX solution for SSR. - OAuth2 with Github Auth and OIDC. OAuth2 delegates authentication to another authentication service. OIDC provides identities. - CSRF protection measures for OAuth2 and all requests. - SQLite3 with sqlc and golang-migrate. - Optional users in database as Identity Provider. Authentication is through WebAuthn, a solution to delegate authentication directly to the user. - JWT is used a session token. Embellishment: - Notyf to notify about errors, include HTMX errors. - Added Hyperscript for edge cases. Motivation For the hype. Usage 1. Edit the config.yaml to set the OAuth2 providers. 2. Set the necessary parameters or environment variables: 3. Run the binary: Help : Application Flow - A home page: - Show login button if not logged in. - Else, show a welcome with routing. - A protected counter page. The login process follows the standard OAuth2 process, which is fully documented on GitHub. Fetching identity is through OIDC or GitHub API.","default_branch":null,"files":null,"tree":[],"storefront":"/r/Darkness4","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Darkness4/auth-htmx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}