Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Replaced the app with Next.js, Golang and Auth0...

KOHEI SATO
June 18, 2024
73

Replaced the app with Next.js, Golang and Auth0 20240619

KOHEI SATO

June 18, 2024
Tweet

Transcript

  1. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    © 2024 e-dash Co., Ltd. Kohei Sato(kohekohe) Replaced the app with Next.js, Golang and Auth0
  2. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    2 © 2024 e-dash Co., Ltd. • Developing SaaS for visualizing CO2 emissions • Startup backed by MITSUI & CO., LTD. • Established in 2022 • Actively recruiting Software Engineers Self-Introduction Name:Kohei Sato(kohekohe) Working for:e-dash Co., Ltd. Role:Software Engineer Residence:Nagoya We help customers with decarbonization!
  3. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    3 © 2024 e-dash Co., Ltd. I joined the current company about a year ago as the first engineer.
  4. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    4 © 2024 e-dash Co., Ltd. My missions are ... 1. building engineering teams 2. replacing the existing application with modern architecture
  5. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    5 What we did? Before After Auth0
  6. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    6 What we did? Before After Auth0 Reasons 1. Modern technologies are popular among engineers(Go, Next.js and ECS) 2. Better leave it to the specialist(Auth0)
  7. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    7 Regarding to authentication[Before] 1. User information is stored in database. 2. Authentication method is implemented by the application. 3. In-memory DB is used for session management. database In-memory DB e-dash app Load Balancer User Login Screen Session management User Infomation etc….
  8. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    8 E-dash CommonID ・call Auth0 API ・manage Organization Regarding to authentication[After] 1. Move user data to Auth0. 2. Link ALB with Auth0 3. New App for user creation(common id) database e-dash app Load Balancer User Auth0 Login Screen User info(e.g. Name, email, password) Create, delete and update user connected redirected Authentication manage session
  9. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    9 Flow when integrating ALB with Auth0 e-dash app Load Balancer User Auth0 Access Token ID Token Refresh Token Header: x-amzn-oidc-accesstoken(Access Token) x-amzn-oidc-data(User Claim) x-amzn-oidc-identity(userID) Session Cookie ① authentication by Auth0 ② issue tokens ④ http request w/ headers ③ issue cookie
  10. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    10 © 2024 e-dash Co., Ltd. The hardest part was transferring all user data from MySQL to Auth0. database Auth0 UserData Migration Tool(go) get mysql dump data call API to create users
  11. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    11 New version released!! about 20 engineers were working! Timeline April 2023 May 2023 I joined e-dash. employed engineer was me only started to implement new app April 2024 Now implementing new functions & updating application! still hiring engineers!! Jan 2024 The originally planned release date😂
  12. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    12 © 2024 e-dash Co., Ltd. Replacing an already operational application is tough😂😂
  13. © 2023 e-dash Co., Ltd. © 2024 e-dash Co., Ltd.

    © 2024 e-dash Co., Ltd. Thank you for listening