authula 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -24
- package/dist/{index-BdPCSdtc.d.ts → index-BTPtw0hH.d.ts} +100 -100
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/index.d.ts +35 -2
- package/dist/plugins/index.js +49 -8
- package/dist/plugins/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -107,30 +107,6 @@ const authulaServerClient = createClient({
|
|
|
107
107
|
const response = await authulaServerClient.core.getMe();
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
### Using with Cookies (SSR Compatible)
|
|
111
|
-
|
|
112
|
-
For server-side rendering or applications that need to handle cookies properly:
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
import { cookies } from "next/headers";
|
|
116
|
-
|
|
117
|
-
import { createClient } from "authula";
|
|
118
|
-
import { CorePlugin, EmailPasswordPlugin, CSRFPlugin } from "authula/plugins";
|
|
119
|
-
|
|
120
|
-
const authulaClient = createClient({
|
|
121
|
-
url: "http://localhost:8080/api/auth",
|
|
122
|
-
plugins: [
|
|
123
|
-
new CorePlugin(),
|
|
124
|
-
new EmailPasswordPlugin(),
|
|
125
|
-
new CSRFPlugin({
|
|
126
|
-
cookieName: "authula_csrf_token",
|
|
127
|
-
headerName: "X-AUTHULA-CSRF-TOKEN",
|
|
128
|
-
}),
|
|
129
|
-
],
|
|
130
|
-
cookies,
|
|
131
|
-
});
|
|
132
|
-
```
|
|
133
|
-
|
|
134
110
|
## Available Plugins
|
|
135
111
|
|
|
136
112
|
The following plugins are available in this SDK:
|