Skip to content
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

Features Request - Admin API (+ Bounty Reward) #305

Open
impactvelocity opened this issue May 31, 2021 · 3 comments
Open

Features Request - Admin API (+ Bounty Reward) #305

impactvelocity opened this issue May 31, 2021 · 3 comments

Comments

@impactvelocity
Copy link

impactvelocity commented May 31, 2021

Love Userbase!

Feature Request 1 :: Create & Update App

Ability to create new apps, and update them. For example, create an app, set the paymentsMode to test. Later I can update it to prod, or adding a domain to the whitelist, etc.

Feature Request 2 :: Independent Stripe per App

Option to have a different stripe account connected to an app. Currently, if I understand it, the stripe is per account. All apps use the same stripe API info. It would be great to be able to have different stripe API per app.

Feature Request 3 :: One Time Payments

Along with subscriptions, it would be nice to have a built in system for allowing users to buy something for a one time fee. That product ID, price ID or whatever gets added to an array on prodStripeData. Maybe: "purchases: [product1, product2]". Would be great if it could support refunds, and remove it from array.

Sometimes I have use cases where an app has one time payments.

Bounty

I think these features could be useful to others. I would like to offer a $1,000 bounty reward for these features to the nice clever person who can create these for me. :)

@j-berman
Copy link
Collaborator

j-berman commented Jun 1, 2021

Sweet! Unfortunately bandwidth from our side is super slim these days, but happy to guide whoever may stumble across this.

Regarding Feature Request 1:

  • With the Userbase prod plan, it may be easier to just create 2 different Userbase apps: a test app and a prod app.
  • You can already add/remove domains to/from the whitelist!

@impactvelocity
Copy link
Author

@j-berman - Thanks!

Request 1 - Can this be through the Admin API ? I couldn't find that in the document besides Get and List apps.

My use case, I will be allow my end users to create a Userbase app for their site (my tools helps makes sites of sorts). So the idea would be to use Userbase. Just create an App for them (through the API) and allow them to edit settings from within my app.

https://userbase.com/docs/api/

I found these files:

https://github.com/smallbets/userbase/blob/master/src/userbase-server/server.js

https://github.com/smallbets/userbase/blob/master/src/userbase-server/app.js

I tried to POST to admin/app/create-app with the auth token and appName and encryptionMode, but it gave a response, Please sign in.

Maybe its a simple ish thing to expose the create-app & update-app? Or is there more security risks for this?

@impactvelocity
Copy link
Author

@j-berman

For these routes: (server.js)

v1Admin.post('/create-app', admin.authenticateAdmin, appController.createAppController)

POST '/apps/:appId/domain' & POST '/stripe/connected/apps/:appId/trial-period',

They use: 'admin.authenticateAdmin'

If I create another version like /create-app-token and use admin.authenticateAccessToken that works locally.

Is that something we can add?

It works locally, but I am having trouble on how to actually host Userbase with EC2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants