feat(oauth,twitter): default oauth2 implementation
This commit is contained in:
@@ -3,6 +3,7 @@ package routes
|
||||
import (
|
||||
"extrovert/templates/layouts"
|
||||
"extrovert/components"
|
||||
"extrovert/internals/app"
|
||||
"net/http"
|
||||
"extrovert/internals/router/errors"
|
||||
e "errors"
|
||||
@@ -12,6 +13,7 @@ type Homepage struct{}
|
||||
|
||||
func (h Homepage) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
||||
err := h.page().Render(context.Background(), w)
|
||||
if err != nil {
|
||||
errors.NewErrInternal(e.New("Unable to render dashboard"), err).ServeHTTP(w, r)
|
||||
@@ -29,8 +31,7 @@ templ (h Homepage) page() {
|
||||
style="height:100%;display:flex;gap:2rem;"
|
||||
>
|
||||
<div style="display:flex;flex-direction:column;gap:1rem;width:15rem;">
|
||||
@components.LoginTwitter()
|
||||
@components.LoginMastodon()
|
||||
@app.TWITTER_APP.LoginButton()
|
||||
</div>
|
||||
<fieldset>
|
||||
<textarea
|
||||
|
||||
Reference in New Issue
Block a user