Mobile Best Practices - 2min. OAuth

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ม.ค. 2025

ความคิดเห็น • 10

  • @ncflg7667
    @ncflg7667 4 ปีที่แล้ว +2

    This flow is only required if you dont have a backend I suppose. If you have a backend server that manages the session of the user could you just use the normal authorization code flow with openid connect to authenticate the user even for mobile apps?

    • @NatSakimura
      @NatSakimura  4 ปีที่แล้ว +1

      There can be a few ways to achieve a good practice when you have a backend. For example, you can just do a normal OpenID Connect with code flow to your backend and do all the subsequent transactions between the backend and the Authorization Server/Resource Server. In this case, the App will just be a user interface and you have to keep the session between the App and the backend somehow. However, even in that case, using PKCE (RFC7636) is recommended.

    • @minhnguyenhoang5596
      @minhnguyenhoang5596 2 หลายเดือนก่อน

      Hi, can I ask what you mean by normal OpenID Connect auth code flow to the backend?
      I’m confused about how to best implement it in my project, I currently have a keycloak running locally as an authorization server and spring boot as a backend, and flutter mobile app as the front end, In my case, do I need 2 separate clients for both the backend as well as the front end or can I use the same client? I appreciate any help and thanks in advance!

  • @alexanderpanfilenok6818
    @alexanderpanfilenok6818 ปีที่แล้ว

    What would you do on mobile app when the access_token is expired?

    • @NatSakimura
      @NatSakimura  ปีที่แล้ว

      One can use refresh token to get a new access token.

  • @sametwork5694
    @sametwork5694 5 ปีที่แล้ว

    Hello Nat,
    why don't we use only /token endpoint ? for example, instead getting authorization code from authorization endpoint, why don't we get access_token from with user_name, password ? what does this give us?

    • @NatSakimura
      @NatSakimura  5 ปีที่แล้ว +1

      If you do that, then it means all the apps can impersonate the user at full privilege. So, the username and password is no longer trustworthy.

    • @aholbreich2803
      @aholbreich2803 3 ปีที่แล้ว

      @@NatSakimura But what if this my App and users in Authorization under my controll. There is no sence to use browser for me couse in this scenario browser is less trusted than my own code. Is this a case for OAuth at all then?

  • @AnasAlQudah
    @AnasAlQudah 5 ปีที่แล้ว

    Why you don't use authorization code with PKCE ?

    • @NatSakimura
      @NatSakimura  5 ปีที่แล้ว +3

      It is using code with PKCE. BCP 212 is the combination of PKCE and in-app browser tab.