0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Supabaseの認証であるsupabase-auth-helpers から auth-helpers は何が変わったのか?

Last updated at Posted at 2022-07-11

2022年の6月にsupabaseの認証がsupabase-auth-helpers から auth-helpers に変更されました。

結論から書くと
supabase-auth-helpersは全部入りの認証ライブラリ。
auth-helpers は個別の認証ライブラリです。

import { UserProvider } from '@supabase/supabase-auth-helpers/react';
import { supabaseClient } from '@supabase/supabase-auth-helpers/nextjs';

と、このように前者はreactとnextjsが一緒に入っています。
それを切り分けたのが後者のauth-helpersです。

import { UserProvider } from @supabase/auth-helpers-react
import { supabaseClient } from @supabase/auth-helpers-nextjs

各フレームワークのライブラリを全部一緒に入れていたのが前者、各フレームワークごとに独立させたのが後者。
React
Next.js
Sveltekit
Remix
今ではこの数だけが対応していますが、これから対応するフレームワークを増やしていくためにライブラリの肥大を避けるため分割したのではないかと思われます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?