Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

There doesn't seem to be an ability to actually change your password?

default discord avatar
Payload-Bot8 months ago
4




This thread is already marked as solved.

  • default discord avatar
    kalon_robsonlast year

    Solved due to original enquiry deleted



    Apologies, you removed your query so I assumed the matter solved. Were you trying to update your password outside the admin panel?



    So if the collection is not set as the

    admin: {user: 'user-collection-slug' }

    in the payload config then the idea is those users would not try to access the payload admin and /admin/account is unavailable to them. So if you wanted customers to change their own passwords you would need to build them a method in which they can do that.



    As an admin. however, you can simply go to the collection item with auth enabled and select change password underneath the email field.



    I'm sure the documentation would benefit from including a mention at the least. However, it is a headless CMS and checks the box for defining auth API endpoints (including reset password etc) allowing you to brand your own frontend with the UI for these features.



    When I want others to access the Payload admin panel I simply add admins and other user types to the same user collection and include a role selector to define access controls from.

  • default discord avatar
    aaronksaunderslast year

    Just wanted to note that I did not find a solution so I wrote my own customs endpoint



    Yes, not the password of the user collection, but a customer collection that has auth associated with it



    I just think that if you are going to allow users to add the auth property on any collection, then at a minimum document, if you are not going to include, the basic functionality for fully supporting that Auth property. I ran into the same issue with forgot password. These are basic expectations and should not require the LOE that it took me to 1) recognize it wasn’t supported and 2) figure out how to implement it



    Thanks for your input, but you do not understand my use case or what I am trying to accomplish.



    We are trying to solve different problems and you are narrowly defining the platform, and answering the question I didn’t ask.



    I think PayloadCMS has a great future ahead, but it is new… I am not criticizing I am providing feedback



    I am trying to change password not forget password. I am trying to push beyond the traditional CMS and use Payload as both CMS and application server support users of the application not just content admins.



    I will try again, but I tried and it didn’t work, was getting a error on model find one… it works perfectly if the collection is user, but fails if the auth collection is not user



    @364124941832159242

    so I found it, I was looking for a specific api call for change password, did not expect that you could just patch the model and change the password. Thanks for pointing me in right direction. Next up is social auth, is there an example for that somewhere?

  • discord user avatar
    jmikrut
    last year

    Hey

    @923397761045512202

    I am catching up here, and I want to make sure I understand what you are looking for



    you don't need to build anything custom to be able to forget / reset password for auth-enabled collections - it's done all out of the box for you



    have you seen these docs and examples?



    https://payloadcms.com/docs/authentication/operations#forgot-password

    we also have a variety of auth boilerplates / examples / videos for how to accomplish everything you need for authentication



    here is a full boilerplate that shows how to give your users control to set / change their own passwords:



    https://github.com/payloadcms/payload/tree/main/examples/auth

    are we missing anything? what were you looking for, which you could not find?



    yes, you can do that out of the box, take a look at the above auth example, there is an account view that shows how to change pw



    that is fantastic - we do stuff like what you are trying to do very frequently



    well, there are a few community plugins for OAuth but I can't vouch for their quality because I've never used them. We offer SSO for enterprise but have not released anything as open source. You could build one, but that would be something you'd need to build on your own. We may have more news on this topic in the coming months though

  • default discord avatar
    poofy259 months ago

    Is it ok to be able to patch the user document with the new password without providing the old password ? I tried this approach but my work requires the check if the old password is valid and then change the password. How do i do that ?

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.