empitsu / quiz_app

0 stars 0 forks source link

firestore #5

Closed empitsu closed 3 years ago

empitsu commented 3 years ago

api routes経由

firestoreをapi routesで叩く(認証なし): https://blog.logrocket.com/building-a-fullstack-application-with-next-js-and-firestore-db/

auth + firestoreのmanual: https://github.com/nabettu/firestore-manual

Restful example: https://nextjs.org/docs/api-routes/introduction

認証

https://qiita.com/Hiro-mi/items/18e00060a0f8654f49d6

JWT https://github.com/mizchi/next-boilerplate-20200727

empitsu commented 3 years ago

XMLHTTPRequest

https://panda-program.com/posts/useswr

https://swr.vercel.app/docs/mutation

https://firebase.google.com/docs/auth/admin/verify-id-tokens

https://codesandbox.io/s/swr-auth-tuqtf?from-embed=&file=/pages/index.js

empitsu commented 3 years ago

ランダムなN件を取得

Cloud Firestore のベスト プラクティス https://firebase.google.com/docs/firestore/best-practices?hl=ja#hotspots

https://stackoverflow.com/questions/48377381/select-random-document-from-firestore/58023128#58023128