IT |
気になる、記になる… |
Belkin、「Amazon タイムセール祭り」で対象製品を最大20%オフで販売するセールを開催中 |
https://taisy0.com/2022/09/25/162659.html
|
airtag |
2022-09-25 11:58:53 |
IT |
気になる、記になる… |
「iOS 16.1 beta」では「AirPods Pro (第2世代)」のタッチコントロールでの音量調節機能の無効化が可能に |
https://taisy0.com/2022/09/25/162658.html
|
airpodspro |
2022-09-25 11:46:16 |
IT |
InfoQ |
Amazon Switched Compression From Gzip to Zstd for Own Service Data |
https://www.infoq.com/news/2022/09/amazon-gzip-zstd/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global
|
Amazon Switched Compression From Gzip to Zstd for Own Service DataA tweet from Adrian Cockcroft former VP at Amazon recently highlighted the benefits of switching from gzip to Zstandard compression at Amazon and triggered discussions in the community about the compression algorithm Other large corporations including Twitter and Honeycomb shared interesting gains using zstd By Renato Losio |
2022-09-25 11:31:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] 満足度の高い「通信講座 公務員ランキング」 2位は「ユーキャン」、1位は? |
https://www.itmedia.co.jp/business/articles/2209/04/news033.html
|
itmedia |
2022-09-25 20:20:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
PyInstallerを使ってExcelVBA感を消したい |
https://qiita.com/kNprogram/items/a4cf2e6ceda19add2fe1
|
excel |
2022-09-25 20:56:39 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
MigemoをPythonで |
https://qiita.com/oguna/items/4b1d9faef130adc6b067
|
migemo |
2022-09-25 20:24:12 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWS Config ルールを CloudFormation StackSets で展開するために、リージョン毎に実装を変える必要があって大変だけど何とかする |
https://qiita.com/sudakos/items/c1c791b544c78e99bb3e
|
awsconfig |
2022-09-25 20:27:57 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
時間割アプリの説明(技術寄り) |
https://qiita.com/moririn2528/items/994d0185d2b55b3c1a97
|
database |
2022-09-25 20:27:52 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Dockerってなんだ |
https://qiita.com/AKINISHI1/items/d3416ace3e455c2a1c65
|
docker |
2022-09-25 20:16:38 |
golang |
Goタグが付けられた新着投稿 - Qiita |
BFFとmicroservicesアーキテクチャ |
https://qiita.com/hirac/items/d4b470afa14e1741ab99
|
caddi |
2022-09-25 20:09:35 |
golang |
Goタグが付けられた新着投稿 - Qiita |
時間割変更アプリの説明 |
https://qiita.com/moririn2528/items/e10070d47275fd10f169
|
説明 |
2022-09-25 20:08:59 |
技術ブログ |
Developers.IO |
Azure App Service で新しいカスタムドメインコンソールがプレビューになっていたので使ってみた |
https://dev.classmethod.jp/articles/azure-app-service-custom-domain-add-preview/
|
customdomainsprev |
2022-09-25 11:51:26 |
技術ブログ |
Developers.IO |
AWS EFS에 대하여 알아보자 |
https://dev.classmethod.jp/articles/what-is-aws-efs-kr/
|
AWS EFS에대하여알아보자안녕하세요클래스메소드의수재입니다 이번에는AWS EFS가무엇인지알아보고인스턴스에연결하는방법에대하여알아보겠습니다 AWS EFS란 Amazon Elastic File System |
2022-09-25 11:18:25 |
海外TECH |
DEV Community |
Implementing Authentication In Next.js Using Next Auth |
https://dev.to/raghavmri/implementing-authentication-in-nextjs-using-next-auth-1g97
|
Implementing Authentication In Next js Using Next AuthIn this post we will be implementing GitHub Twitter and email authentication in Next JS using NextAuth js What is Next Auth NextAuth js is a complete open source authentication solution for Next js applications It has built in hooks that let you access the user from the client side Getting StartedI assume that you have maltreated created initiated your next js project if not just run yarn create next app to create next js boilerplate code Now we can install next auth by running yarn add next auth or npm install next auth Now we can create an API route for the authentication by editing the pages api auth nextauth js file lt kg card begin markdown gt import NextAuth from next auth import GithubProvider from next auth providers github export const authOptions Configure one or more authentication providers providers GithubProvider clientId process env GITHUB ID clientSecret process env GITHUB SECRET add more providers here export default NextAuth authOptions You might need a provider which is a database For this instance I will be using the MongoDB Now we can access the user from the client side by wrapping our component pages app jsx with SessionProviderimport SessionProvider from next auth react export default function App Component pageProps session pageProps return lt SessionProvider session session gt lt Component pageProps gt lt SessionProvider gt Now we ll create a simple home page by editing pages index jsimport Center VStack Text Button from chakra ui react import useSession signIn from next auth react import React from react export default function Home const data useSession return lt Center height my rem gt lt VStack gt lt Text fontSize xl gt Current User data user email None lt Text gt data user amp amp lt Button onClick gt signIn gt Login lt Button gt lt VStack gt lt Center gt Let s create an authentication page pages auth js where the users will be able to log in Register using OAuth Providers like GitHub discordimport Box Center Container Flex Icon VStack Button from chakra ui react import getProviders getSession GetSessionParams signIn useSession from next auth react import FcGoogle from react icons fc import FaDiscord FaGithub from react icons fa import GetServerSideProps from next import useRouter from next router import useEffect from react export default function SignIn providers const router useRouter const user useSession useEffect gt if router query callbackUrl router push router query callbackUrl as string if user data user router push let icons name Google icon FcGoogle name Github icon FaGithub name Discord icon FaDiscord return lt Flex h vh alignItems center justifyContent center gt lt Box border px borderColor gray p rounded xl translateY gt lt VStack gt Object values providers map provider any gt lt Button leftIcon lt Icon as icons find i gt i name toLowerCase provider name toLowerCase icon gt onClick async gt signIn provider id key provider id gt Sign in with provider name lt Button gt lt VStack gt lt Box gt lt Flex gt export const getServerSideProps GetServerSideProps async context gt const session await getSession context const providers await getProviders console log context query if session return redirect destination context query callbackUrl as string permanent false return props providers You may use the useSession hook to obtain the user details on the client side or you may use getSession on the server sideClient Sideimport useSession from next auth react export default function Component const data session status useSession if status authenticated return lt p gt Signed in as session user email lt p gt return lt a href api auth signin gt Sign in lt a gt Server sideasync function myFunction const session await getSession We have successfully now added authentication to our next js site you may now run yarn dev and the dev server might start running ConclusionI have used the Chakra UI library to style up the frontend Full source code is available on GitHubP S Vultr Get a credit by registering using this link is an excellent hosting choice if you re looking for one |
2022-09-25 11:29:14 |
ニュース |
BBC News - Home |
Keir Starmer: Labour would reverse cut to top income tax rate |
https://www.bbc.co.uk/news/uk-politics-63025443?at_medium=RSS&at_campaign=KARANGA
|
labour |
2022-09-25 11:39:18 |
ニュース |
BBC News - Home |
Kwasi Kwarteng: I want to keep cutting taxes |
https://www.bbc.co.uk/news/business-62966306?at_medium=RSS&at_campaign=KARANGA
|
taxestax |
2022-09-25 11:19:58 |
ニュース |
BBC News - Home |
Bristol: Man dies and 90 evacuated in serious flats fire |
https://www.bbc.co.uk/news/uk-england-bristol-63025726?at_medium=RSS&at_campaign=KARANGA
|
alarms |
2022-09-25 11:40:42 |
北海道 |
北海道新聞 |
ケニアのキプチョゲが世界新 2時間1分9秒、マラソン |
https://www.hokkaido-np.co.jp/article/735958/
|
連覇 |
2022-09-25 20:11:37 |
北海道 |
北海道新聞 |
男子は菱川、女子は根本が優勝 ブレイクダンスの国内大会 |
https://www.hokkaido-np.co.jp/article/735988/
|
国際大会 |
2022-09-25 20:24:00 |
北海道 |
北海道新聞 |
胆振管内110人、日高管内26人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/735986/
|
新型コロナウイルス |
2022-09-25 20:22:00 |
北海道 |
北海道新聞 |
胆振管内110人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/735980/
|
新型コロナウイルス |
2022-09-25 20:11:00 |
北海道 |
北海道新聞 |
手話甲子園で埼玉が優勝 県勢初、2校合同チーム |
https://www.hokkaido-np.co.jp/article/735979/
|
高校生 |
2022-09-25 20:07:00 |
コメント
コメントを投稿