You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings! Below I share a little proposal to improve the framework, since the authentication system has not allowed me to continue developing a project that I am doing.
[Context]
I am developing a Rest API with Mandarine as framework (v2.3.2). When implementing the authentication system, I have to implement the loadUserByUsername function in order to obtain the user from the database.
loadUserByUsername returns UserDetails | undefined, so it doesn't allow my implementation to be something like this:
[Alternatives]
The idea is that loadUserByUsername could return Promise<UserDetails | undefined>, since I use MongoDB as the database and it returns a promise as a response to the query.
I have started from the v2.3.2 tag and I have modified three files that allow this implementation correctly. I haven't started from the master branch because it was throwing me several errors (possibly because of the version of Deno I'm using, v1.13.2).
You can see the commit with the modifications in the following branch: link to proposal
I would like to know if I could apply to PR so that it can be offered as a new version v2.3.3
What do you think about this change? I think it would allow better integration with many databases that return promises and implement asynchrony.
[Additional context]
This is the configuration of the development environment, since I have had to fit versions for it to work correctly.
Greetings! Below I share a little proposal to improve the framework, since the authentication system has not allowed me to continue developing a project that I am doing.
[Context]
I am developing a Rest API with Mandarine as framework (v2.3.2). When implementing the authentication system, I have to implement the loadUserByUsername function in order to obtain the user from the database.
loadUserByUsername returns UserDetails | undefined, so it doesn't allow my implementation to be something like this:
[Alternatives]
The idea is that loadUserByUsername could return Promise<UserDetails | undefined>, since I use MongoDB as the database and it returns a promise as a response to the query.
I have started from the v2.3.2 tag and I have modified three files that allow this implementation correctly. I haven't started from the master branch because it was throwing me several errors (possibly because of the version of Deno I'm using, v1.13.2).
You can see the commit with the modifications in the following branch: link to proposal
I would like to know if I could apply to PR so that it can be offered as a new version v2.3.3
What do you think about this change? I think it would allow better integration with many databases that return promises and implement asynchrony.
[Additional context]
This is the configuration of the development environment, since I have had to fit versions for it to work correctly.
This change would be of great help to me to be able to continue with the development of this small project.
My congratulations for the framework. I await comments.
The text was updated successfully, but these errors were encountered: