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
The endpoint you are looking for is called viewer, which returns information about the currently logged in user, no need to specify any username at all. viewer is null if you are not logged in.
Something as simple as this will do:
queryViewer {
viewer {
id
}
}
...but of course you can get more user information from the same object if you want, such as username, email, avatar or the current auth and refresh tokens.
The endpoint you are looking for is called viewer, which returns information about the currently logged in user, no need to specify any username at all. viewer is null if you are not logged in.
Something as simple as this will do:
queryViewer {
viewer {
id
}
}
...but of course you can get more user information from the same object if you want, such as username, email, avatar or the current auth and refresh tokens.
Is there an endpoint, that based on jwt (or refresh token) tell me if im logged n?
im actually using the user query with my usename and jwt, but it feel quiete unsecure, i mean i can pass any username registered on the system
i would prefere an endpoint like /me that return the current user/owner of jwt
thank you
The text was updated successfully, but these errors were encountered: