(params?: CtxOrReq)
| 213 | * |
| 214 | */ |
| 215 | export async function getCsrfToken(params?: CtxOrReq) { |
| 216 | if (typeof window === 'undefined') { |
| 217 | return; |
| 218 | } |
| 219 | const response = await fetchData<{ csrfToken: string }>( |
| 220 | 'csrf', |
| 221 | __LINEN_AUTH, |
| 222 | logger, |
| 223 | params |
| 224 | ); |
| 225 | return response?.csrfToken; |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * It calls `/api/auth/providers` and returns |
no outgoing calls
no test coverage detected