Rafael Pettersen
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai there is no getToken from Wasp
36 replies
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai that did not work, how can i pass the wasp user authorization to the headers, for instance, to be used in useChat?
36 replies
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai i'm calling the api from a external module:
and would like the pass header auth like below, is that correct?
36 replies
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai on your point 1, how can i sen the authentication token correctly?
36 replies
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai ok, it kind of worked, i do get context.entities, but context.user is null, even having a user logged in.
here's main.wasp:
and here is the api declaration:
36 replies
WWasp
•Created by Rafael Pettersen on 12/31/2024 in #đŸ™‹questions
AuthUser in Server
@kapa.ai and how do i have access to the context? I'm trying to access user data from an api route function, that is declared like this: app.api('chat', {
fn: { import: 'handler', from: '@src/server/handler },
auth: true,
httpRoute: ['POST', '/api/handler']
});
36 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
Thanks @Filip, appreciate the heads up.
I did manage to work removing and just using Is that part of the custom signup action? If not, no problem, will do the extra redundant login once we update the version.
29 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
Found a solution, here's what it worked for me:
29 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
@kapa.ai If I set the session id using setSessionId(response.sessionId); is it enough to make sure the user is authenticated?
29 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
@kapa.ai I'm doing the "Custom Signup Logic". Here is the code for the authentication:
Does it look ok?
29 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
@kapa.ai related to this issue, i have followed the tutorial https://wasp-lang.dev/docs/auth/entities#custom-signup-action and it is working ok, but considering the user that received a email invite, and after this user first sign in, the authIdentity was set and session created, but why this user still are redirected to the login page, and even if I manually change the url to a internal dashboard, it still requires the user to login?
29 replies
WWasp
•Created by Rafael Pettersen on 12/2/2024 in #đŸ™‹questions
Inviting Users
Thanks @kapa.ai, I wil try that approach.
29 replies