Skip to content

Commit ef1cccc

Browse files
authored
Merge pull request #10 from hongwei1/main
refactor/added email to JWT
2 parents ef033d7 + 0b299d1 commit ef1cccc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/scala/com/tesobe/oidc/tokens/JwtService.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class JwtServiceImpl(config: OidcConfig, keyPairRef: Ref[IO, KeyPair])
122122
.withKeyId(config.keyId)
123123
.withClaim("azp", clientId)
124124
.withClaim("name", user.name.orNull)
125-
.withClaim("email", user.email.orNull)
125+
.withClaim("email", user.email.getOrElse(s"${user.sub}@noemail.local"))
126126
.withClaim(
127127
"provider",
128128
user.provider.getOrElse(config.issuer)

0 commit comments

Comments
 (0)