Open3

Auth0

みるべあみるべあ

Google ログインができなくなった!?

Google連携はデフォルトで有効になっているが...
初期開発用のため設定が必要だった。

▼ こんなログが出力される

You are using Auth0 development keys which are only intended for use in development and testing. This connection (google-oauth2) should be configured with your own Development Keys to enable the consent page to show your logo instead of Auth0's. AUTH0 DEVELOPMENT KEYS SHOULD NOT BE USED ON PRODUCTION ENVIRONMENTS. To learn more about Development Keys please refer to https://auth0.com/docs/connections/social/devkeys

参考

https://dev.classmethod.jp/articles/auth0-google/

みるべあみるべあ

ログイン直後のページにブラウザバックできない

  1. ログインして指定のリダイレクトURLに遷移
  2. 任意のページに遷移
  3. ブラウザバック router.back() で戻る

上記の手順を実行すると、URLは遷移元に戻るがページのレンダリングが始まらない。

対応方法

router.replace() によって履歴を上書きする力技で乗り切る。

const router = useRouter()

useEffect(() => {
  if (router.isReady) {
    router.replace(ROUTES.MYPAGES)
  }
}, [router.isReady])