next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

Should signin and signout be camel case?

Open ryanbahan opened this issue 6 years ago • 3 comments

Please refer to the documentation, the example project and existing issues before creating a new issue.

Your question A clear and concise question.

Should the signin and signout methods be camel case, to reflect the rest of the methods like useSession and getSession that are?

What are you trying to do A description of what you are trying to do.

Being overly semantic :]

Documentation feedback Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.

  • [x] Found the documentation helpful
  • [ ] Found documentation but was incomplete
  • [ ] Could not find relevant documentation
  • [ ] Found the example project helpful
  • [ ] Did not find the example project helpful

ryanbahan avatar Jun 29 '20 22:06 ryanbahan

I am not actually averse to this.

We could leave in both options in the client, so that it works for either - e.g. signin() or signIn().

We could make the leap to make it a breaking change in v3, but I'd rather just deprecate the old methods and not remove them yet to avoid too much pain for folks upgrading.

iaincollins avatar Jun 30 '20 07:06 iaincollins

That sounds good! I can't imagine a need to make this a breaking change either.

ryanbahan avatar Jul 02 '20 18:07 ryanbahan

I've updated the example and documentation for v3 to reflect it will be camelCase.

The lowercase versions are still supported in the client for now, but will be deprecated (and eventually removed) in future releases.

There is a similar issue with pages, events and callbacks, they will be a breaking change in v3 because realistically we can't support everything and and they should only be defined in one place, so folks will have to change when they upgrade.

iaincollins avatar Jul 03 '20 22:07 iaincollins