Skip to content

Commit 8745e98

Browse files
Merge pull request #378 from supertokens/timejoined-fix
fix: timeJoined
2 parents d65e7f6 + cbe0f62 commit 8745e98

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- Added `ValidateAccessToken` to the configuration for social login providers, this function allows you to verify the access token returned by the social provider. If you are using Github as a provider, there is a default implementation provided for this function.
1515

16+
### Fixes
17+
18+
- Fixes `timeJoined` casing in emailpassword and passwordless user objects.
19+
1620
## [0.16.0] - 2023-09-27
1721

1822
### Fixes

recipe/emailpassword/authFlow_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func TestSignInAPIworksWithValidInput(t *testing.T) {
155155

156156
assert.Equal(t, signupUserInfo["id"], signInUserInfo["id"])
157157
assert.Equal(t, signupUserInfo["email"], signInUserInfo["email"])
158-
assert.Equal(t, signupUserInfo["timejoined"], signInUserInfo["timejoined"])
158+
assert.Equal(t, signupUserInfo["timeJoined"], signInUserInfo["timeJoined"])
159159
}
160160

161161
func TestSignInAPIworksWithValidInputAndTenantIdInPath(t *testing.T) {

recipe/emailpassword/epmodels/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type TypeNormalisedInputResetPasswordUsingTokenFeature struct {
6464
type User struct {
6565
ID string `json:"id"`
6666
Email string `json:"email"`
67-
TimeJoined uint64 `json:"timejoined"`
67+
TimeJoined uint64 `json:"timeJoined"`
6868
TenantIds []string `json:"tenantIds"`
6969
}
7070

recipe/passwordless/plessmodels/models.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type User struct {
2525
ID string `json:"id"`
2626
Email *string `json:"email"`
2727
PhoneNumber *string `json:"phoneNumber"`
28-
TimeJoined uint64 `json:"timejoined"`
28+
TimeJoined uint64 `json:"timeJoined"`
2929
TenantIds []string `json:"tenantIds"`
3030
}
3131

recipe/thirdpartypasswordless/api_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func TestForThirdPartyPasswordlessSignInUpFlowWithEmailUsingTheEmailOrPhoneConta
158158
assert.NotNil(t, user)
159159
assert.NotNil(t, user["email"])
160160
assert.NotNil(t, user["id"])
161-
assert.NotNil(t, user["timejoined"])
161+
assert.NotNil(t, user["timeJoined"])
162162
assert.Nil(t, user["phoneNumber"])
163163
}
164164

@@ -262,7 +262,7 @@ func TestForThirdPartyPasswordlessSignUpSignInFlowWithPhoneNumberUsingEmailOrPho
262262
assert.NotNil(t, user)
263263
assert.Nil(t, user["email"])
264264
assert.NotNil(t, user["id"])
265-
assert.NotNil(t, user["timejoined"])
265+
assert.NotNil(t, user["timeJoined"])
266266
assert.NotNil(t, user["phoneNumber"])
267267
}
268268

@@ -753,7 +753,7 @@ func TestWithThirdPartyPasswordlessConsumeCodeAPIWithMagicLink(t *testing.T) {
753753
assert.NotNil(t, user)
754754
assert.NotNil(t, user["email"])
755755
assert.NotNil(t, user["id"])
756-
assert.NotNil(t, user["timejoined"])
756+
assert.NotNil(t, user["timeJoined"])
757757
assert.Nil(t, user["phoneNumber"])
758758
}
759759

@@ -852,7 +852,7 @@ func TestWithThirdPartyPasswordlessConsumeCodeAPIWithCode(t *testing.T) {
852852
assert.NotNil(t, user)
853853
assert.NotNil(t, user["email"])
854854
assert.NotNil(t, user["id"])
855-
assert.NotNil(t, user["timejoined"])
855+
assert.NotNil(t, user["timeJoined"])
856856
assert.Nil(t, user["phoneNumber"])
857857

858858
consumeCodePostData = map[string]interface{}{

0 commit comments

Comments
 (0)