> ## Documentation Index
> Fetch the complete documentation index at: https://svault.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Both

> Implement both native authentication and OAuth into your application

1. To implement native authentication and OAuth, you can use SvelteKit's [Sequence](https://kit.svelte.dev/docs/modules#sveltejs-kit-hooks-sequence) helper function.
2. In your existing `hooks.server.ts` file, add the following:

```TypeScript theme={null}
import { sequence } from '@sveltejs/kit/hooks';
/*
NOTE: CANNOT HAVE 2 HANDLE FUNCTIONS!

export const handle = SvaultNative(redirectPath);
export const handle = SvaultOauth({ providers });
*/

// Rename functions to their corresponding type of authentication
export const native = SvaultNative(redirectPath);
export const oauth = SvaultOauth({ providers });

// Use sveltekit sequence method to run both hooks in sequence
export const handle = sequence(oauth, native);
```
