mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
docs: fix typos across several files (#561)
This commit is contained in:
@@ -15,7 +15,7 @@ description: LinkedIn Provider
|
||||
In the LinkedIn portal under products you need the **Sign In with LinkedIn using OpenID Connect** product.
|
||||
</Callout>
|
||||
|
||||
There a some different Guides here:
|
||||
There are some different Guides here:
|
||||
[Authorization Code Flow (3-legged OAuth) (Outdated)](https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow)
|
||||
[Sign In with LinkedIn using OpenID Connect](https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin-v2?context=linkedin%2Fconsumer%2Fcontext)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ description: Twitter Provider
|
||||
}
|
||||
```
|
||||
<Callout type="warn">
|
||||
If twitter doesn't return the email address, the authencatino wouldn't be successful. Make sure to ask for the email address when you create the Twitter app.
|
||||
If twitter doesn't return the email address, the authentication wouldn't be successful. Make sure to ask for the email address when you create the Twitter app.
|
||||
</Callout>
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -195,7 +195,7 @@ On top of normal methods, the client provides hooks to easily access different r
|
||||
|
||||
### Fetch Options
|
||||
|
||||
The client uses a libray called [better fetch](https://better-fetch.vercel.app) to make requests to the server.
|
||||
The client uses a library called [better fetch](https://better-fetch.vercel.app) to make requests to the server.
|
||||
|
||||
Better fetch is a wrapper around the native fetch API that provides a more convenient way to make requests. It's created by the same team behind Better Auth and is designed to work seamlessly with it.
|
||||
|
||||
|
||||
@@ -82,11 +82,11 @@ Create Auth endpoints wraps around `createEndpoint` from Better Call. Inside the
|
||||
- `baseURL`: the baseURL of the auth server. This includes the path. For example, if the server is running on `http://localhost:3000`, the baseURL will be `http://localhost:3000/api/auth` by default unless changed by the user.
|
||||
- `session`: The session configuration. Includes `updateAge` and `expiresIn` values.
|
||||
- `secret`: The secret key used for various purposes. This is defined by the user.
|
||||
- `authCookie`: The defualt cookie configuration for core auth cookies.
|
||||
- `authCookie`: The default cookie configuration for core auth cookies.
|
||||
- `logger`: The logger instance used by Better Auth.
|
||||
- `db`: The kysely instance used by Better Auth to interact with the database.
|
||||
- `adapter`: This is the same as db but it give you `orm` like functions to interact with the database. (we recommend using this over `db` unless you need raw sql queries or for performance reasons)
|
||||
- `intenralAdapter`: this are intenral db calls that are used by Better Auth. You can use this calls for example to create session instead of using `adapter` directly. `intenralAdapter.createSession(userId)`
|
||||
- `internalAdapter`: These are internal db calls that are used by Better Auth. For example, you can use these calls to create a session instead of using `adapter` directly. `internalAdapter.createSession(userId)`
|
||||
- `createAuthCookie`: This is a helper function that let's you get a cookie `name` and `options` for either to `set` or `get` cookies. It implements things like `__secure` prefix and `__host` prefix for cookies based on
|
||||
|
||||
For other properties, you can check the <Link href="https://github.com/bekacru/better-call">Better Call</Link> documentation and the <Link href="https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/init.ts">source code </Link>.
|
||||
@@ -340,7 +340,7 @@ const myPluginClient = {
|
||||
|
||||
If you need to add additional methods or what not to the client you can use the `getActions` function. This function is called with the `fetch` function from the client.
|
||||
|
||||
Better Auth uses <Link href="https://bette-fetch.vercel.app"> Better fetch </Link> to make requests. Better fetch is a simple fetch wrapper made by the same author of Better Auth.
|
||||
Better Auth uses <Link href="https://better-fetch.vercel.app"> Better fetch </Link> to make requests. Better fetch is a simple fetch wrapper made by the same author of Better Auth.
|
||||
|
||||
```ts title="client-plugin.ts"
|
||||
import type { BetterAuthClientPlugin } from "better-auth/client";
|
||||
|
||||
@@ -186,7 +186,7 @@ export default function UserCard(){
|
||||
|
||||
#### Verifying TOTP
|
||||
|
||||
After the user has entered their 2FA code, you can verify it usinng `twoFactor.verifyTotp` method.
|
||||
After the user has entered their 2FA code, you can verify it using `twoFactor.verifyTotp` method.
|
||||
|
||||
```ts
|
||||
const verifyTotp = async (code: string) => {
|
||||
|
||||
@@ -76,7 +76,7 @@ const user = await client.signIn.anonymous()
|
||||
|
||||
### Link Account
|
||||
|
||||
If a user is already signed in anonymously and tries to `signIn` or `signUp` with another method, their anonymous activites can linked to the new account.
|
||||
If a user is already signed in anonymously and tries to `signIn` or `signUp` with another method, their anonymous activities can linked to the new account.
|
||||
|
||||
To do that you first need to provide `onLinkAccount` callback to the plugin.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user