Skip to content

Commit 22631c8

Browse files
committed
google sso (SAML) and updated UI
1 parent 66525b8 commit 22631c8

10 files changed

Lines changed: 568 additions & 13 deletions

File tree

client/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Use to simulate different environments (DEV, UAT, PROD)
2+
# Shared dev deployment: https://tdm-dev.azurewebsites.net
23
VITE_ENV=DEV

client/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/components/Authorization/Login.jsx

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as Yup from "yup";
77
import * as accountService from "../../services/account.service";
88
import Button from "../Button/Button";
99
import ContentContainer from "../Layout/ContentContainer";
10+
import angelenoAccountButton from "../../images/angeleno-account-button-light.svg";
1011

1112
const useStyles = createUseStyles(theme => ({
1213
warningText: {
@@ -26,6 +27,31 @@ const useStyles = createUseStyles(theme => ({
2627
justifyContent: "center",
2728
margin: "16px auto"
2829
},
30+
angelenoAccountSignIn: {
31+
alignItems: "center",
32+
display: "flex",
33+
flexDirection: "column",
34+
gap: "8px"
35+
},
36+
angelenoAccountButton: {
37+
background: "transparent",
38+
border: 0,
39+
cursor: "pointer",
40+
minHeight: "46px",
41+
minWidth: "258px",
42+
padding: 0,
43+
width: "258px"
44+
},
45+
angelenoAccountButtonImage: {
46+
display: "block",
47+
height: "auto",
48+
width: "258px"
49+
},
50+
angelenoAccountTagline: {
51+
...theme.typography.paragraph1,
52+
margin: 0,
53+
textAlign: "center"
54+
},
2955
divider: {
3056
alignItems: "center",
3157
display: "flex",
@@ -182,14 +208,24 @@ const Login = () => {
182208
>
183209
Sign in with Google SSO (City staff)
184210
</Button>
185-
<Button
186-
id="cy-login-angeleno"
187-
type="button"
188-
variant="primary"
189-
onClick={handleAngelenoLogin}
190-
>
191-
Sign in with Angeleno Account (external users)
192-
</Button>
211+
<div className={classes.angelenoAccountSignIn}>
212+
<button
213+
aria-label="Sign in with Angeleno Account"
214+
className={classes.angelenoAccountButton}
215+
id="cy-login-angeleno"
216+
type="button"
217+
onClick={handleAngelenoLogin}
218+
>
219+
<img
220+
alt="Sign in with Angeleno Account"
221+
className={classes.angelenoAccountButtonImage}
222+
src={angelenoAccountButton}
223+
/>
224+
</button>
225+
<p className={classes.angelenoAccountTagline}>
226+
Your one account to access City of Los Angeles services.
227+
</p>
228+
</div>
193229
</div>
194230
<div className={classes.divider}>or sign in with TDM credentials</div>
195231
<Formik
Lines changed: 113 additions & 0 deletions
Loading

server/.env.example

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,11 @@ ANGELENO_TOKEN_URL=https://login.sandbox.account.lacity.gov/oauth/token
5555
ANGELENO_JWKS_URL=https://login.sandbox.account.lacity.gov/.well-known/jwks.json
5656
ANGELENO_SCOPE=openid profile email
5757

58-
# Google SSO / OIDC for internal City users
59-
# Set GOOGLE_SSO_DEMO_MODE=true for local demos without OAuth credentials.
58+
# Google SSO for internal City users
59+
# GOOGLE_SSO_PROTOCOL=oauth keeps the existing OAuth/OIDC flow.
60+
# Set GOOGLE_SSO_PROTOCOL=saml to use Google Workspace SAML instead.
61+
# Set GOOGLE_SSO_DEMO_MODE=true for local OAuth demos without provider credentials.
62+
GOOGLE_SSO_PROTOCOL=oauth
6063
GOOGLE_SSO_DEMO_MODE=true
6164
GOOGLE_SSO_DEMO_EMAIL=
6265
GOOGLE_SSO_DEMO_FIRST_NAME=
@@ -72,6 +75,15 @@ GOOGLE_SSO_TOKEN_URL=
7275
GOOGLE_SSO_JWKS_URL=
7376
GOOGLE_SSO_SCOPE=openid profile email
7477

78+
# Google Workspace SAML (used only when GOOGLE_SSO_PROTOCOL=saml)
79+
# Configure these values from the Google Workspace custom SAML app.
80+
GOOGLE_SAML_SP_ENTITY_ID=http://localhost:5001/google-saml
81+
GOOGLE_SAML_ACS_URL=http://localhost:5001/api/accounts/google/saml/acs
82+
GOOGLE_SAML_IDP_SSO_URL=
83+
GOOGLE_SAML_IDP_ENTITY_ID=
84+
GOOGLE_SAML_IDP_CERT=
85+
GOOGLE_SAML_CLOCK_SKEW_MS=5000
86+
7587
#########################################
7688
## Shared Dev Environment (Azure) ##
7789
## https://tdm-dev.azurewebsites.net ##
@@ -82,8 +94,11 @@ GOOGLE_SSO_SCOPE=openid profile email
8294
# SERVER_URL=https://tdm-dev.azurewebsites.net
8395
# ANGELENO_DEMO_MODE=false
8496
# ANGELENO_REDIRECT_URI=https://tdm-dev.azurewebsites.net/api/accounts/angeleno/callback
97+
# GOOGLE_SSO_PROTOCOL=oauth
8598
# GOOGLE_SSO_DEMO_MODE=false
8699
# GOOGLE_SSO_REDIRECT_URI=https://tdm-dev.azurewebsites.net/api/accounts/google/callback
100+
# GOOGLE_SAML_SP_ENTITY_ID=https://tdm-dev.azurewebsites.net/google-saml
101+
# GOOGLE_SAML_ACS_URL=https://tdm-dev.azurewebsites.net/api/accounts/google/saml/acs
87102
#
88103
# Register with Angeleno (sandbox):
89104
# Callback URL: https://tdm-dev.azurewebsites.net/api/accounts/angeleno/callback

0 commit comments

Comments
 (0)