#chiayi

1 messages · Page 1 of 1 (latest)

lapis doveBOT
proper rock
#

Secret store API allows you to save up to 10 secrets for each scope, so it's up to you how you should like to store it.

Since isAuthenticated is a boolean and not sensitive information, it can be saved within your database instead of Stripe

gritty hamlet
#

okay, regarding the diagram in the doc:
Two users sharing the same Stripe account: “User 1”, “User 2”

where can I see the users of my stripe account?

#

referring to my previous question, I think my question was whether I can use secret store api in an app that is not an stripe app

proper rock
#

Secret store API is for Stripe app and access from Stripe app. With your own application, why can't it be managed in your own database?

gritty hamlet
#

it can be managed in my own database, but an api would be an easier retrieval than database because you will need to initialize a database beforehand, api requires no initalization

lapis doveBOT
gritty hamlet
#

this is my stripe app currently showing screen A

the button Sign in on CorgiAI website redirects the user to my company's website

can you guide me on whether if this is possible:

  1. after user successfully completes sign up process and login with an account
  2. access secret store api from company's website backend server api, stores IsAuthenticated, True in secret store api
  3. stripe app frontend checks if isAuthenticated == True and displays screen B
  4. if isAuthenticated ==False stay at screen A
chrome moss
#

Hi, not sure about the previous question but I think this store secret api is only available on stripe app, and also on the stripe app Backend as mentioned in the Doc.

#

For your flow you would want to try it out! Sorry can't advise on concrete business logic

#

The steps looks possible tho

gritty hamlet
#

okay, where can I see the users of my stripe account? on my profile I only see list of accounts

chrome moss
gritty hamlet
#

yes okay so its actually a member rather than a user

gritty hamlet
chrome moss
#

Have you tried listing all secrets?

gritty hamlet
#

yes, it will still not return the value

chrome moss
#

I mean do you see your secret via its Id?

gritty hamlet
#

yes, but i don't see the secret value 🤔 what should I do with its Id?

chrome moss
#

In your response of Find a secret, what do you see in the payload field?

#

Probably you want to expand payload

gritty hamlet
#

i only see these fields (from the screenshot), even when I look in the docs sample response it doesn't seem like it will output the value

  "id": "appsecret_5110UWLXV0005GHjtzG1F5WYaFhJjy",
  "object": "apps.secret",
  "created": 1648494781232,
  "expires_at": null,
  "livemode": false,
  "name": "my-api-key",
  "scope": {
    "type": "account"
  }
}

https://stripe.com/docs/api/apps/secret_store/find?lang=python

chrome moss
#

on the call to retrieve the secret

gritty hamlet
#

okay got it, this is how to do it

secret = stripe.apps.Secret.find(
  name="isAuthenticated",
  scope={"type": "user", "user": user_id},
  expand=['payload']
)