How to set up an authentication module on Google Cloud with PHP. Step 1: Create your list of admin users Go to https://console.cloud.google.com/iam-admin/iam/project?project=<your_project_name>&authuser=0 and add users and assign roles to them. I used my work Gmail account as an admin user, and my personal Gmail as an ordinary user. Step 2. specify resources for login In your app.yaml file, specify which resources you want to be restricted to authenticated users, and which are admin-only. - url : / script : index . php login : required secure : always # this requires login but is available to all users - url : / admin script : admin / index . php login : admin secure : always # this requires login and is only available to admin users Step 3. Add authentication PHP to your header include This is the code for my normal user pages: <? php use google\appengine\api\users\User ; use google\appengine\api\users\UserService ; $user = U
I had a problem where my screen kept freezing while I was using Chrome, and a colleague recommended turning off hardware acceleration in order to stop that happening. It worked, so I thought I would share how to do it.
Comments
Post a Comment