Conversation
12 tasks
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
janithjay
force-pushed
the
update-cred-new-password-only
branch
5 times, most recently
from
September 16, 2026 02:52
ee82871 to
887cf88
Compare
Signed-off-by: janithjay <janithjayashan018@gmail.com>
janithjay
force-pushed
the
update-cred-new-password-only
branch
from
September 16, 2026 03:58
887cf88 to
fd241fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
There was no way for a signed-in user to update their own credentials from
@thunderid/nextjs,@thunderid/nuxt,@thunderid/node, or@thunderid/express.BaseUserProfiledeliberately filters credential attributes out of the profile form, so password was unreachable from any SDK component, even though the backend already supportsPOST /users/me/update-credentials.This PR adds a
ChangeCredentialcomponent to@thunderid/nextjsand@thunderid/nuxt, wires it into a real "My Account" page (Personal info + Security) in both quickstart samples, and adds the underlying capability to@thunderid/nodeand@thunderid/expressfor apps without a UI component layer.Fixed a bug: the Nuxt quickstart's profile update returned
500(Schema validation failed).Approach
ChangeCredentialcomponent (new)ThunderIDNextClient.updateUserCredentials()→updateUserCredentialsAction(server action, maps errors server-side, same pattern asupdateUserProfileAction) →<ChangeCredential />, which wraps@thunderid/react'sBaseChangeCredentialThunderIDNuxtClient.updateUserCredentials()→ new Nitro routePATCH /api/auth/user/credentials(mirrorsprofile.patch.ts) →<ChangeCredential />, which wraps@thunderid/vue'sBaseChangeCredentialNode / Express (new)
Neither has a UI component layer, so this is a headless client method rather than a component:
@thunderid/node:ThunderIDNodeClient.updateUserCredentials(payload, userId?)- new method calling the coreupdateMeCredentialsfunction with the session's access token attached, resolved viaresolveResourceEndpoint('usersMeCredentials', configData)the same way every other SDK does.@thunderid/express:ThunderIDExpressClient.updateUserCredentialsFromRequest(req, payload)- mirrors the existinggetUserFromRequest(req)pattern: reads the session cookie, then calls the inheritedupdateUserCredentials.PATCH /api/me/credentialsroute (bearer-token protected, consistent with the sample's other/api/*routes), plus a Postman collection entry and README update.Bug fix: Nuxt profile update returning
500Schema.Validate()validates the entire submittedattributespayload, it doesn't merge the edit with the already-stored entity first. React and Vue'sUserProfilecontainers alreadydeepMergethe edited field onto the stored profile before submitting, but Nuxt's container sent only the edited field, so every single-field edit failed validation.deepMergestep Nuxt was missing.New Interface
Related Issues
Related PRs
Checklist
breaking changelabel added.Security checks