Authenticating with ORCID, The Open Science Framework, and GakuNin RDM Using NextAuth.js

Overview This article describes how to perform authentication with ORCID, OSF (The Open Science Framework), and GRDM (GakuNin RDM) using NextAuth.js. Demo Apps ORCID https://orcid-app.vercel.app/ OSF https://osf-app.vercel.app/ GRDM https://rdm-app.vercel.app/ Repository ORCID https://github.com/nakamura196/orcid_app Below is an example of the options configuration. https://github.com/nakamura196/orcid_app/blob/main/src/app/api/auth/[…nextauth]/authOptions.js e } x ; p p ] c } o r , a , r o { } l a } a } t v , l s , s , i i n t c c a } t u } p } b y s s r y i } r c d d a y l l u , o s , r , a n e e e n f e o e : m p i i t u p } k e u a } o r } c c s s t c t t t n r e e e e h r a , e r r s , f e ; k s s u ( o o u s s " : : n n o l r s r r n i l y c } r i t i n e s s i i r j a k k r t : o t t r : a c e e : n : n o ) e l u d a m : e o o n w c e e n r " " I S i m o s d f c n h } ; t e r : m a s n n t c n n a [ c O o d e z " s p p i " o " s e , u ( n e i { s . . s ( o . . t u i R a : c a h : e o r h : h r t a A A r p p : l i a u e { u a o o t d C u r t t : n e t t e d u c n r { r : o c s s n c r k h " I t p e i t { s c t { t q r e t c o o p n c e s t t c c e O , D h r t o p " e t p p u e r h e a f f r p ( e r i o ) e i n p " " o : n s / _ _ s s e s s o p w i i o r { s . o k s d ; t , , c : : a t u : : s : r t a l l f o s i n e { s i e p / u y r / / t = i : i e e i f s T d ; n T = o s r { / t p i / / ( { z t ) [ l i e o , o n s o o h e : o p { a a " " e l s k = k a s . c r e : r u w t a r { o . e s e a e c e e c n p c b t a i p e r p . i n t c n c = n s i t " r i . o i o p s c e p o o c o v s d i c o d o k t n l . i r e n = k o = u { . . . c o c . r e : i j d s r , e u n O e o a d e o c n f c s - o s t n n a t R n r t e s r i s e ` a o i n o t o . t c . C v g e " s g d t B t n d ? n o k o c o I . / " , . / . } c e i ( e . ? k e r } o r D O o , e o o ) h a o ) n n . e n c ) u c _ R a n a r ( r n ; t a e n . i n i C C u v u g { ` e / i m m a d { t d L I t . t / h r j f e a } c ; . ; I D h N h v t s i ? i ) c a E _ / E / 3 t $ o e . l e c N C a X t . p { n r [ s { s c T L u T o 0 s t " " " ? s e _ I t A k / : o , ] g . T A s I E h U e [ / k . i e o d s D N o T n O / e p v m k d _ , T r H " R p n a e a e t _ i _ , C u s t n i n O o S z U I b . h - l ; R k E e R D . a , n ? C e C " L ] o c a . I n R , " r c m [ D ; E + , c e e 0 T i s s ] I , " d s G " ? D / . _ e ] . a o t t ? e t p r o . m o i g k O v a / / e R a i s a v n C l l e u 3 } I u , s t . ` D e s h 0 , i / / I + o c $ D n a { " l t l o " b k a e + c n k s p / . r o o o r r f c c i i i l d d e " } . , ` p , e r { s o n ? . n a m e ? . [ " f a m i l y - n a m e " ] ? . v a l u e , OSF https://github.com/nakamura196/osf-app ...

November 15, 2024 · 21 min · Nakamura

Verifying OAuth Authentication Using Drupal's Simple OAuth and Postman

Overview We verify OAuth authentication using Drupal’s Simple OAuth and Postman. I previously wrote the following article, but this time I will explore it further. Configure Simple OAuth in Drupal Please refer to the following. /en/posts/e4ce978db12227/#oauthクライアントの作成 Postman When the grant type is password For /oauth/token, the following was specified in Body > x-www-form-urlencoded: Key Value grant_type password client_id {created CLIENT_ID, e.g., gt8UKlKltI4qs1XP5KLucIXiYw9ulGb0xS4RyO437dc} client_secret {created CLIENT_SECRET, e.g., test} username {username, e.g., yamato} password {password, e.g., yamato} As a result, the following JSON was returned: ...

March 2, 2024 · 11 min · Nakamura

Trying OAuth2 Authentication for REST Resources Using Drupal's simple_oauth Module

Overview Drupal’s Simple OAuth (OAuth2) & OpenID Connect module is described as an implementation of the OAuth 2.0 Authentication Framework RFC. https://www.drupal.org/project/simple_oauth For related articles, please also refer to examples of cookie authentication and JWT authentication. Installation There appear to be version 5.x and 6.x of the simple_oauth module, but this time version 5.x is used. Install with the following: c o m p o s e r . p h a r r e q u i r e ' d r u p a l / s i m p l e _ o a u t h : ^ 5 . 2 ' However, when using Sakura Rental Server, the following error occurred. PHP's sodium extension was required. ...

January 2, 2024 · 19 min · Nakamura

Auth0 Provider and Strapi Tutorial

Overview I tried authenticating Strapi using Auth0. I was able to accomplish this by following the steps in the article below. https://strapi.io/blog/auth0-provider-and-strapi-tutorial-1 However, in the section specifying Allowed Callback URLs, I needed to change http://localhost:1337/connect/auth0/callback to http://localhost:1337/api/connect/auth0/callback. (Reference) GitHub Following the above steps as a reference, I was also able to successfully configure GitHub as a provider.

April 24, 2023 · 1 min · Nakamura