File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 88import { marshall , unmarshall } from '@aws-sdk/util-dynamodb'
99import { randomWords } from '@bifravst/random-words'
1010import { models } from '@hello.nrfcloud.com/proto-map/models'
11+ import { normalizeEmail } from '../users/normalizeEmail.js'
1112import { consentDurationSeconds } from './consentDuration.js'
1213
1314export type PublicDeviceRecord = {
@@ -138,7 +139,7 @@ export const publicDevicesRepo = ({
138139 Math . round ( ( now ?? new Date ( ) ) . getTime ( ) / 1000 ) +
139140 consentDurationSeconds ,
140141 model,
141- ownerEmail : email ,
142+ ownerEmail : normalizeEmail ( email ) ,
142143 } ,
143144 {
144145 removeUndefinedValues : true ,
Original file line number Diff line number Diff line change 11import { Context } from '@hello.nrfcloud.com/proto-map/api'
22
33import jwt from 'jsonwebtoken'
4+ import { normalizeEmail } from '../users/normalizeEmail.js'
45
56export const userJWT = (
67 email : string ,
@@ -15,7 +16,7 @@ export const userJWT = (
1516 jwt . sign (
1617 {
1718 '@context' : Context . userJWT . toString ( ) ,
18- email,
19+ email : normalizeEmail ( email ) ,
1920 } ,
2021 privateKey ,
2122 {
You can’t perform that action at this time.
0 commit comments