Retrieves the current user’s full profile including populated institution, account, and Google OAuth status. Proactively refreshes expired Google tokens when a refresh_token is available. Returns a fresh JWT token (sliding session) — store this token to extend the session without re-authentication.
JWT token passed in x-access-token header
Profile refreshed successfully
Whether the operation was successful
Fresh JWT token (sliding session). Each profile refresh extends the session by the configured expiration period (default 6 hours). Store this token and use it for subsequent API requests.
Full user profile object (User model fields merged with populated institution, plus Google OAuth flags). Sensitive fields (password, permissions, __v, created) are stripped.