Skip to content
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

LoginParams password is optional, but throws Parameter 'password' is required #10487

Open
ComLock opened this issue Mar 27, 2024 · 4 comments
Open
Assignees
Labels
Types Typings

Comments

@ComLock
Copy link
Member

ComLock commented Mar 27, 2024

login({
	user: 'blablabla'
});

Throws:

2024-03-27 12:54:35,459 ERROR c.e.xp.portal.impl.main.MainExecutor - Error while executing com.acme.example.tsup Application controller
java.util.concurrent.CompletionException: com.enonic.xp.resource.ResourceProblemException: Parameter 'password' is required

Documentation is unclear:
https://developer.enonic.com/docs/xp/stable/api/lib-auth#login

@ComLock
Copy link
Member Author

ComLock commented Mar 27, 2024

Also LoginResult message should be optional

@rymsha rymsha added the Types Typings label Apr 4, 2024
@rymsha
Copy link
Contributor

rymsha commented Apr 4, 2024

It actually might be optional - when skipAuth is true

@ComLock
Copy link
Member Author

ComLock commented Apr 5, 2024

Which can be reflected in the type, and isn't currently

@rymsha
Copy link
Contributor

rymsha commented Apr 5, 2024

PR is very welcome

Also LoginResult message should be optional

Fixed separately #10497

@ComLock ComLock self-assigned this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Types Typings
Projects
None yet
Development

No branches or pull requests

2 participants