-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for email & phone number login / signup
- Loading branch information
1 parent
32377dc
commit 0ca850c
Showing
12 changed files
with
20 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,8 @@ const ( | |
// Authorizer server endpoint | ||
AuthorizerURL = "http://localhost:8080" | ||
) | ||
|
||
var ( | ||
// Test email | ||
TestEmail = "[email protected]" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func DeactivateAccountExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func GetProfileExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func GetSessionExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func LoginExample() { | |
} | ||
|
||
res, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func LogoutExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ package examples | |
|
||
import ( | ||
"fmt" | ||
"time" | ||
|
||
"github.com/authorizerdev/authorizer-go" | ||
) | ||
|
@@ -15,7 +14,7 @@ func SignUpExample() { | |
} | ||
|
||
res, err := c.SignUp(&authorizer.SignUpInput{ | ||
Email: fmt.Sprintf("test.%[email protected]", time.Now().Unix()), | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
ConfirmPassword: "Abc@123", | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func UpdateProfileExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ func ValidateJWTTokenExample() { | |
} | ||
|
||
loginRes, err := c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ func ValidateSessionExample() { | |
panic(err) | ||
} | ||
_, err = c.Login(&authorizer.LoginInput{ | ||
Email: "[email protected]", | ||
Email: &TestEmail, | ||
Password: "Abc@123", | ||
}) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters