Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Can we access secrets from client app like react app #42

Closed
navneetgarggate6 opened this issue Jan 31, 2020 · 5 comments
Closed

Can we access secrets from client app like react app #42

navneetgarggate6 opened this issue Jan 31, 2020 · 5 comments
Labels
api: secretmanager Issues related to the googleapis/nodejs-secret-manager API. type: question Request for information or clarification. Not an issue. web

Comments

@navneetgarggate6
Copy link

I want to access secrets/env variables from the client side react app (browser) what is the way to use it ?
do we need to use https://kubernetes.io/docs/reference/using-api/client-libraries/ or we can do it with some other methods where all the keys should secure ?

@product-auto-label product-auto-label bot added the api: secretmanager Issues related to the googleapis/nodejs-secret-manager API. label Jan 31, 2020
@bcoe bcoe added the type: question Request for information or clarification. Not an issue. label Feb 1, 2020
@bcoe
Copy link
Contributor

bcoe commented Feb 1, 2020

@navneetgarggate6 while not fully supported, you can potentially use this library in the front-end using the approach described here.

Let us know if you're able to?

@navneetgarggate6
Copy link
Author

I already checked that implementation but my problem is that i don't want to use auth as i want to access all the secret before login

@bcoe
Copy link
Contributor

bcoe commented Feb 3, 2020

@navneetgarggate6 I don't believe that there is any way to achieve this, the client library requires authentication before you will be able to access secrets.

What you might want to consider is setting up an endpoint, with a service like express, that your frontend interacts with to access secrets.

Keep in mind, if you don't require authentication, you should be very mindful about exposing secrets on public routes, as anyone in the world will potentially see information critical to your application.

@lvl99
Copy link

lvl99 commented Feb 12, 2020

Is it possible to use the secrets manager in conjunction with Firebase Auth?

Just trying to figure out how I could use OAuth with Secrets Manager in an Electron app...

@sofisl
Copy link
Contributor

sofisl commented Nov 11, 2022

Hi there! We are migrating this repo to googleapis/google-cloud-node. We kindly ask that you reopen your issue there if you're still experiencing it. Thank you!

@sofisl sofisl closed this as completed Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: secretmanager Issues related to the googleapis/nodejs-secret-manager API. type: question Request for information or clarification. Not an issue. web
Projects
None yet
Development

No branches or pull requests

5 participants