Code Monkey home page Code Monkey logo

Comments (8)

naturalprogrammer avatar naturalprogrammer commented on June 3, 2024

Strange. Help wanted if anyone else can try and reproduce the issue...

from spring-lemon.

abhinavpawar93 avatar abhinavpawar93 commented on June 3, 2024

Can you also help me implement the same social login via mobile apps. As the auth token returned by them is different and throws 401 when passing to get Context

from spring-lemon.

naturalprogrammer avatar naturalprogrammer commented on June 3, 2024

I've no idea on mobile apps and how they would be different. Could you please explain what's the exact issue and how Spring Lemon could support this you think?

from spring-lemon.

abhinavpawar93 avatar abhinavpawar93 commented on June 3, 2024

Hi, thanks for the reply.
Let me explain in detail:
When we hit this api: /oauth2/authorization/google (For login using Google via web browser)
we are expecting code from google auth on this endpoint : /login/oauth2/code/google. Right?
Then an auth token is generated and user is redirected to this end point with access token (which can be exchanged with an Access token using getContext API) : /social-login-success?token

But, in mobile devices we use Google sdk for login which returns auth code to our app, and not on our server end point which is (/login/oauth2/code/google). How can I use this code to generate access token for that particular code.

Any help will be appreciated as I am stuck with this from past 3 days. BTW thanks for the amazing library. +1

from spring-lemon.

naturalprogrammer avatar naturalprogrammer commented on June 3, 2024

Not sure how to support it. But why do you use the Google SDK? Why not the server endpoint, just like a webapp? Hope your app is cookie enabled.

from spring-lemon.

abhinavpawar93 avatar abhinavpawar93 commented on June 3, 2024

from spring-lemon.

naturalprogrammer avatar naturalprogrammer commented on June 3, 2024

Ok, thanks for posting the solution -- it might help others. However, I still have a question: you'll then need to code the social login in Android/iOS -- separately for each Google, Feacbook, GitHub ...? What's the exact problem in using the server redirects instead, just like web applications?

from spring-lemon.

abhinavpawar93 avatar abhinavpawar93 commented on June 3, 2024

Mobile devices use sdks for these social logins. Hence no server redirects. Thanks for the help.

from spring-lemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.