-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support first_screen, extra_params and direct_sign_in params (#13)
- Loading branch information
Showing
7 changed files
with
321 additions
and
23 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php declare(strict_types=1); | ||
namespace Logto\Sdk\Constants; | ||
|
||
/** The identifier type for sign-in. */ | ||
enum AuthenticationIdentifier: string | ||
{ | ||
case email = 'email'; | ||
case phone = 'phone'; | ||
case username = 'username'; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php declare(strict_types=1); | ||
namespace Logto\Sdk\Constants; | ||
|
||
/** The method to be used for direct sign-in. */ | ||
enum DirectSignInMethod: string | ||
{ | ||
case social = 'social'; | ||
case sso = 'sso'; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php declare(strict_types=1); | ||
namespace Logto\Sdk\Constants; | ||
|
||
/** The first screen to show in the sign-in experience. */ | ||
enum FirstScreen: string | ||
{ | ||
case resetPassword = 'reset_password'; | ||
case signIn = 'identifier:sign_in'; | ||
case register = 'identifier:register'; | ||
case singleSignOn = 'single_sign_on'; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php declare(strict_types=1); | ||
namespace Logto\Sdk\Models; | ||
|
||
use Logto\Sdk\Constants\DirectSignInMethod; | ||
|
||
/** Options for direct sign-in. */ | ||
class DirectSignInOptions extends JsonModel | ||
{ | ||
public function __construct( | ||
/** The method to be used for the direct sign-in. */ | ||
public DirectSignInMethod $method, | ||
/** | ||
* The target to be used for the direct sign-in. | ||
* For `method: 'social'`, it should be the social connector target. | ||
*/ | ||
public string $target, | ||
) { | ||
} | ||
} |
Oops, something went wrong.