tangled
alpha
login
or
join now
moth11.net
/
rvcx
3
fork
atom
backend for xcvr appview
3
fork
atom
overview
issues
4
pulls
pipelines
add key id
moth11.net
7 months ago
8f99f194
0a683084
+5
-1
2 changed files
expand all
collapse all
unified
split
server
internal
handler
oauthHandlers.go
oauth
service.go
+3
server/internal/handler/oauthHandlers.go
···
27
27
if err != nil {
28
28
h.serverError(w, err)
29
29
}
30
30
+
31
31
+
cski := os.Getenv("CLIENT_SECRET_KEY_ID")
32
32
+
ro.KeyID = &cski
30
33
rro := map[string]any{"keys": []any{ro}}
31
34
w.Header().Set("Content-Type", "application/json")
32
35
encoder := json.NewEncoder(w)
+2
-1
server/internal/oauth/service.go
···
7
7
8
8
"github.com/bluesky-social/indigo/atproto/auth/oauth"
9
9
"github.com/bluesky-social/indigo/atproto/syntax"
10
10
+
"os"
10
11
)
11
12
12
13
type Service struct {
···
19
20
if err != nil {
20
21
return nil, err
21
22
}
22
22
-
err = config.SetClientSecret(key, "secret.key.name_")
23
23
+
err = config.SetClientSecret(key, os.Getenv("CLIENT_SECRET_KEY_ID"))
23
24
app := oauth.NewClientApp(&config, store)
24
25
return &Service{app}, nil
25
26
}