Learn Golang by building a fintech banking app — Lesson4: User authentication and Bank transfers PART 1

Radoslaw Fabisiak
8 min readJun 9, 2020
Golang course Lesson4: User authentication

This article was originally published at: https://www.blog.duomly.com/golang-course-with-building-a-fintech-banking-app-lesson-4-user-authentication-and-bank-transactions-part-1

Intro

In Lesson 4 of the Golang course, we will talk about user authentication and banking transactions.

In the previous episodes of the course, we learned how to do migrations:

Golang course with building a fintech banking app — Lesson 1: Start the project

We learned how to do user login:

Golang course with building a fintech banking app — Lesson 2: Login and REST API

And, we learned how to do user registration:

Golang course with building a fintech banking app — Lesson 3: User registration

As well you need to remember about Angular 9 course created by my friend Anna:

Angular Course with building a banking application with Tailwind CSS — Lesson 1: Start the project

Today, we can focus on something crazy interesting, that is one of the main functionality in our project.

Of course, I mean bank transfers that I’ve told you about in the previous episode.

But not only!

In this lesson of the Golang course, we will learn how to get users and refactor a bit of the code.

I will teach you how yo use user authentication with JWT token as well.

Let’s start!

If you prefer video, here is the youtube version:

Create readBody in api.go

In the first step of this Golang course lesson, we need to refactor our api.go file a bit.

Most of the API calls have a very similar structure, so we do not need to duplicate the same code all the…

Radoslaw Fabisiak

Core developer in www.duomly.com - Programming online courses