Skip to content

Silverstripe 5 compatibility #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

anhld
Copy link

@anhld anhld commented Oct 10, 2023

Update the module to work with Silverstripe 5; it's built upon Unclecheese's work.

Copy link
Owner

@Firesphere Firesphere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First quick glance over the PR

use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Security\Authenticator;

class CustomAuthenticatorRegistry
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name "CustomAuthenticatorRegistry" is too generic, a more descriptive and/or concise naming

}

Security::setCurrentUser(null);
// We don't take any action here.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the token stays valid, which is even worse than logging out from everywhere...

{
$response = Resolver::resolveCreateToken(
null,
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test addresses should be example.com

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example.com instead of a functional domain

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this email. Example.com

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeating :)

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here too

['Email' => '[email protected]', 'Password' => 'error'],
[],
new ResolveInfo([])
['email' => '[email protected]', 'password' => 'error']
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the final one. example.com should be used in test/demoes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants