| @@ -30,6 +30,8 @@ import ( |
| 30 | "pkg.rbrt.fr/glean/internal/tmpl" | 30 | "pkg.rbrt.fr/glean/internal/tmpl" |
| 31 | ) | 31 | ) |
| 32 | | 32 | |
| | 33 | +var oauthScopes = []string{"atproto", "transition:generic"} |
| | 34 | + |
| 33 | func splitString(s, sep string) []string { | 35 | func splitString(s, sep string) []string { |
| 34 | return strings.Split(s, sep) | 36 | return strings.Split(s, sep) |
| 35 | } | 37 | } |
| @@ -58,9 +60,9 @@ func New(database *db.DB, clientID, callbackURL, addr string, scheduler *feed.Sc |
| 58 | host = "127.0.0.1" + host | 60 | host = "127.0.0.1" + host |
| 59 | } | 61 | } |
| 60 | cbURL := fmt.Sprintf("http://%s/auth/callback", host) | 62 | cbURL := fmt.Sprintf("http://%s/auth/callback", host) |
| 61 | - config = oauth.NewLocalhostConfig(cbURL, []string{"atproto", "transition:generic"}) | 63 | + config = oauth.NewLocalhostConfig(cbURL, oauthScopes) |
| 62 | } else { | 64 | } else { |
| 63 | - config = oauth.NewPublicConfig(clientID, callbackURL, []string{"atproto", "transition:generic"}) | 65 | + config = oauth.NewPublicConfig(clientID, callbackURL, oauthScopes) |
| 64 | } | 66 | } |
| 65 | oauthClient := oauth.NewClientApp(&config, oauthStore) | 67 | oauthClient := oauth.NewClientApp(&config, oauthStore) |
| 66 | | 68 | |