Doorkeeper Devise API User Authentication | Ruby On Rails 7 Tutorial

  Рет қаралды 16,041

Deanin

Deanin

Күн бұрын

This tutorial covers creating a Rails authentication solution that allows you to login to your regular Rails app AND your Rails API! This solution is scalable for multiple API's, and includes solutions to common problems such as logins from mobile devices and issuing client ID and client secrets.
In the future, this tutorial will hopefully be used to create more advanced React, Vue, and React Native API applications.
Nejdetkadir's Demo: github.com/nejdetkadir/devise...
Nejdetkadir On Twitter: / nejdetkadirr
RubyYagi Blog Post: rubyyagi.com/rails-api-authen...
Doorkeeper Gem: github.com/doorkeeper-gem/doo...
Bootstrap 5: getbootstrap.com/docs/5.0/get...
Rack-Cors: github.com/cyu/rack-cors
Source Code: github.com/Deanout/doorkeeper
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
linktr.ee/deanin
Join this channel to get access to perks:
/ @deanin
If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
Timestamps
0:00 Intro And Doorkeeper Multi-Access Demo
3:10 Creating The Core Rails Application
13:03 Adding Doorkeeper To The Rails Application
25:08 Create The API Application Controller
27:12 Creating The API Only Books Controller Facade/BFF
30:30 Creating The Doorkeeper API Users Registrations Controller
42:06 Creating The Android API, Admin Only Facade/BFF
45:57 User and Oauth Token Creation And Revokation.
55:14 Adding Rack-Cors Gem To Restrict Access By IP/Request
#Deanin #Software #Programming

Пікірлер: 31
@Deanin
@Deanin 2 жыл бұрын
Just wanted to say thanks to Nejdetkadir (twitter.com/nejdetkadirr) for the demo for this project. Also a big thank you to the channel members/patreon supporters who encourage me to stay up all night making these videos haha. You're all the best!
@nejdetkadir4447
@nejdetkadir4447 2 жыл бұрын
@Mixesha001
@Mixesha001 2 жыл бұрын
That’s some good stuff here. At the moment you probably make the most useful content in the rails community.
@Deanin
@Deanin 2 жыл бұрын
I appreciate that! Glad it was helpful 🙂
@xarxlugner2991
@xarxlugner2991 2 жыл бұрын
Thank you dean! i can't wait for the next content
@matthewruvalcaba9735
@matthewruvalcaba9735 2 жыл бұрын
Thanks for sharing! I hope we get the react video soon!
@Deanin
@Deanin 2 жыл бұрын
Working on it! I'm trying to build my own application so I have a bit of motivation for this project haha. The biggest blocker for me is usually just getting the token authentication working. Considering how smooth this was, it shouldn't be too bad getting a proper video out by next week. Famous last words lol
@ingemarandrade277
@ingemarandrade277 Жыл бұрын
Thank you so much for this tutorial! ❤
@learning9166
@learning9166 Жыл бұрын
Thank you for this tutorial Deanin.
@nshinsuke4919
@nshinsuke4919 Жыл бұрын
Very helpful. Just subscribed your channel. Thank you very much.
@orce
@orce 2 жыл бұрын
OMG yes! this... pretty much this... you sir are the man!
@mundotennis
@mundotennis Жыл бұрын
Thanks for the video! For production, should we add a separate controller to create Doorkeeper::Application per client so that we don't expose the client_id ('Web Client' client_id)?
@nadbwah282
@nadbwah282 2 жыл бұрын
Thank you so much for posting this video!! ❤️
@Deanin
@Deanin 2 жыл бұрын
I should be thanking you for supporting the channel! I hope the video is helpful! 🙂
@nadbwah282
@nadbwah282 2 жыл бұрын
@@Deanin yes it definitely is very helpful 👍🙏
@v_gauther
@v_gauther 2 жыл бұрын
Amazing video ! What kind of rails application did you generate ? Did you use the --api arguments ?
@Deanin
@Deanin 2 жыл бұрын
I think for this one I didn't use the --api argument, because people (myself included) have been wanting to know how to allow API login as well as regular login.
@v_gauther
@v_gauther 2 жыл бұрын
@@Deanin thx for your answer, that’s exactly what I was looking for
@xwaxy1753
@xwaxy1753 2 жыл бұрын
This is gold man, thx
@Deanin
@Deanin 2 жыл бұрын
Happy to help! Feels like one of those topics that everyone in the industry knows but nobody outside of it has covered lol
@sugamkarki697
@sugamkarki697 Жыл бұрын
Hi, can you export your postman api config and add it to the repo too? It would be much easier then
@sayambar7307
@sayambar7307 Жыл бұрын
Hi, Can you just explain the requirement of oauth_access_grants table?
@cleversonluizcorreiadesouz5959
@cleversonluizcorreiadesouz5959 Жыл бұрын
Great content! Thanks a lot man... One thing that I don't quite understand was why did you create a namespace and a scope in your routes, what was the point? Thanks a lot!
@Deanin
@Deanin Жыл бұрын
It can help to keep things cleaner, but it was also just a chance to show people how to do it. It's one of those topics where a dedicated video probably wouldn't be something people would even know to search for because they might not know it's possible, so sometimes I'll stress it in other videos to give them exposure to the idea. You could do the same thing without the scope or the namespace, it doesn't matter really
@cleversonluizcorreiadesouz5959
@cleversonluizcorreiadesouz5959 Жыл бұрын
@@Deanin Oh, I see... Thanks a lot for your time and for answering me... Cheers from Brazil!
@jouzou3709
@jouzou3709 2 жыл бұрын
hai dean, can you make pure backend rails for like todos app and conect to react website
@Deanin
@Deanin 2 жыл бұрын
Yeah I have a much more involved React tutorial coming soon. I think there's a tutorial on the channel for a pure todos app with Rails and React, but without any login. So if you want login, check back next week probably
@jouzou3709
@jouzou3709 2 жыл бұрын
@@Deanin thanks appreciate it
@abdullahsaleh7196
@abdullahsaleh7196 13 күн бұрын
Keep going mate🫡
@dbdb3267
@dbdb3267 2 ай бұрын
Thanks a lot. Not easy to complete as other tutorials. May be to improve it, you could show at the beginning the final result that we want to get. Then start developing it ?
@marcusl16
@marcusl16 2 жыл бұрын
If you believe in God existence, He is surely guiding you, because this video arrives just in time, when I started my research about Api auth on r7 thank you so much for you and for mr nejdetkadir for providing this project
Authentication basics with Ruby on Rails
46:17
CJ Avilla
Рет қаралды 13 М.
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 8 МЛН
Would you like a delicious big mooncake? #shorts#Mooncake #China #Chinesefood
00:30
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 4,5 МЛН
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 580 М.
Setup A Ruby on Rails 7 API With React JS
15:11
Deanin
Рет қаралды 41 М.
Let's build an Airbnb clone with Ruby on Rails - Part 1
1:01:19
15 crazy new JS framework features you don’t know yet
6:11
Fireship
Рет қаралды 404 М.
5 New AI Tools You Should Try
9:18
Skill Leap AI
Рет қаралды 7 М.
Custom Protected Route Component in React
10:58
Cosden Solutions
Рет қаралды 32 М.
RUBY ON RAILS API  - User authentication and authorization
1:34:21
Nomads Of Code
Рет қаралды 3,2 М.
What Is JWT and Why Should You Use JWT
14:53
Web Dev Simplified
Рет қаралды 1,1 МЛН
О, сосисочки! (Или корейская уличная еда?)
00:32
Кушать Хочу
Рет қаралды 8 МЛН