GoogleCloudPlatform / cloud-run-anthos-reference-web-app

An opinionated set of best practices aimed at demonstrating a reference architecture for building a web application on Google Cloud using Cloud Run for Anthos.
https://cloud.google.com/anthos/run
Apache License 2.0
37 stars 22 forks source link

Missing instructions for setting up Admin #117

Closed averikitsch closed 4 years ago

averikitsch commented 4 years ago

Actual instructions:

cd webui
npm run init-admin <email>

user.ts:
can't find 'credentials'

require('../credentials')

This logic isn't correct

if (userRecord.customClaims && userRecord.customClaims.role !== role)

Updates instructions:

cd webui
npm i # or maybe just cypress
npm run init-admin <email>

user.ts:

if (!userRecord.customClaims || userRecord.customClaims!.role !== role)
adamdkane commented 4 years ago

@zsxking is this a dupe of #114 ? if so can you please de-dupe it.