Giter Site home page Giter Site logo

angular2-social-auth's People

Contributors

hemantjadon avatar

Stargazers

 avatar

Watchers

 avatar

angular2-social-auth's Issues

[Help Wanted] callback of social auth.

Place of issue.

When started to write the code for social auth google login.

Type:

The OAuth providers require a redirect_uri.

Description:

The main issue faced with wiring up the social login in javascript apps, is that there is no common schema for doing so.

  • You have a url, generally of type https://dev.provider.com/oauth/<api_version>/?client_id=<key>&redirect_uri=<URL>.
  • when we redirect the user from the clent using the configration object, we end up getting back to the
    <redirect_uri> page, which corresponds to a view which does not have any prior knowledge of the source of the login flow.
  • now the problem which arises is that as soon as the user is redirected to that page,
    we cannot call the proper function corresponding to, to the response from the provider.

How i think it should be resolved:

  • We use promises to fire up the the login flow.
  • When user responds, we get redirected to redirect_uri.
  • now there must be some mechanism which stamps the data from this url and resolves the promise.
  • I really don't know how it is possible to resovle a promise after the redirect, (we can't use ajax initially to fire up the consent page).

Implementations which I have seen :

  • Google's main JS Client side library : https://developers.google.com/identity/sign-in/web/sign-in
    • This is entire Promise driven approach in which the response comes back in form of JSON.
  • Facebook's JavascriptSDK :
    • This is Facebook's approach for the same.

The internals of both these approach, similar on the surface.

Required information :

  • Is there any safe and secure way for implementing this login flow?
  • Is it possible to get client side JS apis to implement this flow of other providers (except Facebook and Google)?
  • If this is not at all possible then, how to incorporate general client side Social Authentication, For Angular2 apps?

Any help or even discussion is welcomed.

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.