Authentication in SwiftUI App Using JSON Web Token (JWT)

Поделиться
HTML-код
  • Опубликовано: 16 апр 2021
  • In this video, Mohammad Azam will demonstrate how to use JSON Web Token authentication in a SwiftUI application. Azam will demonstrate how to implement a NodeJS (ExpressJS) server on Glitch, which can generate a token and send to the client. The client can later send that token to verify authenticity.
    GitHub: github.com/azamsharp/SwiftUIA...
    Server: glitch.com/edit/#!/strong-spa...
    Book: Surviving the Coding Bootcamp - From no coding experience to earning a six-figure salary
    www.amazon.com/dp/B09YXDQFP2
    Check out my courses:
    www.udemy.com/user/mohammad-a...
    Get courses from Big Mountain Studio:
    1. Combine Mastery in SwiftUI
    www.bigmountainstudio.com/com...
    2. SwiftUI Animations
    www.bigmountainstudio.com/ani...
    3. SwiftUI Views Mastery
    www.bigmountainstudio.com/vie...
    4. Visual Swift Memory Mastery
    www.bigmountainstudio.com/swi...
    5. Working with Data in SwiftUI
    www.bigmountainstudio.com/dat...
    6. SwiftUI in UIKit Weekened Kickstarter
    www.bigmountainstudio.com/kic... Check out my courses at
    azamsharp.school/

Комментарии • 33

  • @shurale85
    @shurale85 3 года назад +4

    As a backend dev who is interested in ios, I found it really useful!

  • @ZHANEKA92
    @ZHANEKA92 2 года назад +2

    Thank you for super clear explanation! Finally figured out how an authentication works and what is token and why we need it :D

  • @KPstrng77
    @KPstrng77 2 года назад

    Thank you so much for sharing! I'm making an app for a site and api I created 2 years ago, and could not figure out how to authenticate using a jwt until seeing your video.

  • @juanpablomontoyao.1281
    @juanpablomontoyao.1281 3 года назад +1

    Really well explained. Thank you man :) def checking your courses after I finish one I already started

  • @Fitwithnayak
    @Fitwithnayak 2 года назад +1

    Outstanding crystal clear explaination . Thank you so much for the video.

  • @marcaupont9145
    @marcaupont9145 3 года назад +3

    Loved it! Simple and effective!

  • @davicampos802
    @davicampos802 3 года назад +1

    OMG , I was waiting for this video ❤️🎊 ,

  • @shobique
    @shobique 3 года назад

    Thank you! Great video! Everything is laid out on the shelves! 👍

  • @lenerggonzalez8071
    @lenerggonzalez8071 Год назад

    one of the best video that i have seen in my life

  • @lukassbeataddicts
    @lukassbeataddicts 2 года назад

    you explaining like a boss.

  • @zutclifftercel3824
    @zutclifftercel3824 2 года назад

    Very useful, perfect explanation, thank you!

  • @FrozzenHalo
    @FrozzenHalo 3 года назад +2

    This is really well done and presented so simply. Great job!

  • @aranali1745
    @aranali1745 7 месяцев назад

    A very useful and great video, thank you so much!

  • @andrews13
    @andrews13 3 месяца назад +1

    Excellent!!!💯

  • @gurcangulec
    @gurcangulec 2 года назад

    Very useful! Thanks!

  • @closernear5058
    @closernear5058 2 года назад

    great tutorial !!

  • @jasiek393
    @jasiek393 3 года назад +1

    Hello, can you show the way how to sign in e.g. with google or apple(using JWT and oauth2)?

  • @lukassbeataddicts
    @lukassbeataddicts 2 года назад +1

    I have a server responding with token and a refresh token as well. How to avoid logging out the user after main token expiries? I know I have to send refresh token when getting 401.

  • @DanielHaanpaa
    @DanielHaanpaa Год назад

    Very helpful, How do we handle refresh tokens?

  • @roganr3953
    @roganr3953 3 года назад

    How to add basic auth in your program,
    and im getting no response in debug log

  • @nuar6472
    @nuar6472 2 года назад

    what framework are you using?

  • @pimouxosu
    @pimouxosu 2 года назад

    Very great tutorial, but it is secure to store data like passwords, jwt tokens in the app storage (userDefaults) ?

    • @azamsharp
      @azamsharp  2 года назад +1

      No. You should not store passwords in UserDefaults. Also, when you create a token make sure to not store sensitive data in the token.

  • @scidisc
    @scidisc 11 месяцев назад

    Did you ever figure out why when sending the incorrect token you do not get the required response?

  • @larsorjan
    @larsorjan 2 года назад

    Hi. Can you tell me what tool you use to highlight the area on the screenrecording?

    • @azamsharp
      @azamsharp  2 года назад

      Demo pro

    • @larsorjan
      @larsorjan 2 года назад

      @@azamsharp thank you! Love this tutorial btw!

  • @ZHANEKA92
    @ZHANEKA92 2 года назад

    Hi. Could you please say may this tutorial be relatable for any backend? I have to implement registration, login for iOS app.

  • @alejandro_tejedo
    @alejandro_tejedo 2 года назад

    If I have the login with Apple, how I can do the same

    • @azamsharp
      @azamsharp  2 года назад

      For Apple Login you will need to read docs for Apple Auth framework.

  • @dotsdigitalltd7756
    @dotsdigitalltd7756 2 года назад

    Great video!
    Try putting the jwt.verify() into a try-catch block.
    From the documentation:
    try {
    var decoded = jwt.verify(token, 'SECRET');
    } catch(err) {
    // Handle err
    }