@@ -33,7 +33,6 @@ export type User = {
3333 nickname : string ;
3434 fullName : string ;
3535 imageUrl : string ;
36- companyName : string ;
3736 emailNotifications ?: Record < string , boolean > ;
3837 userId : string ;
3938 keys : Keys ;
@@ -102,7 +101,6 @@ export class AuthClient {
102101 nickname : idToken . payload . nickname ,
103102 fullName : idToken . payload . name ,
104103 imageUrl : profile . imageUrl ,
105- companyName : idToken . payload [ "custom:companyName" ] ,
106104 emailNotifications : idToken . payload [ "custom:emailNotifications" ]
107105 ? JSON . parse ( idToken . payload [ "custom:emailNotifications" ] )
108106 : { } ,
@@ -166,7 +164,6 @@ export class AuthClient {
166164 nickname : idToken . payload . nickname ,
167165 fullName : idToken . payload . name ,
168166 imageUrl,
169- companyName : idToken . payload [ "custom:companyName" ] ,
170167 emailNotifications : idToken . payload [ "custom:emailNotifications" ]
171168 ? JSON . parse ( idToken . payload [ "custom:emailNotifications" ] )
172169 : { } ,
@@ -203,13 +200,11 @@ export class AuthClient {
203200 password,
204201 nickname,
205202 fullName,
206- companyName,
207203 } : {
208204 email : string ;
209205 password : string ;
210206 nickname : string ;
211207 fullName ?: string ;
212- companyName ?: string ;
213208 } ) {
214209 const keys = generateKeys ( ) ;
215210 const encryptedPrivateKeys : string = encryptPrivateKeys ( keys , password ) ;
@@ -221,7 +216,6 @@ export class AuthClient {
221216 nickname,
222217 encryptedPrivateKeys,
223218 fullName,
224- companyName,
225219 } ) ;
226220 } catch ( e ) {
227221 throw new UsernameAlreadyExistsError ( ) ;
@@ -230,7 +224,6 @@ export class AuthClient {
230224 const userData = {
231225 username : nickname ,
232226 fullName,
233- companyName,
234227 appId : "testApp" ,
235228 encryptionPublicKey : encodeBase64 ( keys . encryptionPublicKey ) ,
236229 signPublicKey : encodeBase64 ( keys . signPublicKey ) ,
@@ -245,29 +238,24 @@ export class AuthClient {
245238
246239 async updateProfile ( {
247240 fullName,
248- companyName,
249241 emailNotifications,
250242 } : {
251243 fullName ?: string ;
252- companyName ?: string ;
253244 emailNotifications ?: Record < string , boolean > ;
254245 } ) {
255246 if ( ! this . user || ! this . session ) return ;
256247
257248 await this . apiClient . updateUserProfile ( {
258249 fullName,
259- companyName,
260250 emailNotifications : JSON . stringify ( emailNotifications ) ,
261251 token : ( await this . getCurrentAuthorizationToken ( ) ) || "" ,
262252 } ) ;
263253 await this . cognitoClient . updateCognitoProfile ( this . session , {
264254 fullName,
265- companyName,
266255 emailNotifications : JSON . stringify ( emailNotifications ) ,
267256 } ) ;
268257
269258 this . user . fullName = fullName || this . user . fullName ;
270- this . user . companyName = companyName || this . user . companyName ;
271259 this . user . emailNotifications =
272260 emailNotifications || this . user . emailNotifications ;
273261 }
@@ -485,7 +473,6 @@ export class AuthClient {
485473 nickname : idToken . payload . nickname ,
486474 fullName : idToken . payload . name ,
487475 imageUrl,
488- companyName : idToken . payload [ "custom:companyName" ] ,
489476 emailNotifications : idToken . payload [ "custom:emailNotifications" ]
490477 ? JSON . parse ( idToken . payload [ "custom:emailNotifications" ] )
491478 : { } ,
0 commit comments