-
Notifications
You must be signed in to change notification settings - Fork 1
Finish /plans implementation #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
api/v1_users_developer_apps.go
Outdated
|
|
||
| // requirePlansAppAuth validates Bearer token and checks that the plans app has a grant from the user. | ||
| // Must run after requireUserIdMiddleware. | ||
| func (app *ApiServer) requirePlansAppAuth(c *fiber.Ctx) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels like it should belong somewhere else?
config/config.go
Outdated
| RewardCodeAuthorizedKeys []string | ||
| LaunchpadDeterministicSecret string | ||
| UnsplashKeys []string | ||
| AudiusApiSecret string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe some context of where this is used/why it's here? It may not be obvious this is just for the plans app and not being used broadly for the api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is reasonable to have across the API, other things could use it. I'll add a comment though.
It's so that you can authorize api.audius.co to do something for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps... i just don't want there to be confusion about "oh i have an api key, it probably has access to do stuff on behalf of users" or whatever
Play with it here:
https://weathered-field-271e.audius.workers.dev/
It's a bit messy, will do some passes with cursor to clean up after it goes out