Git Product home page Git Product logo

Comments (6)

simov avatar simov commented on April 28, 2024

You can't use AJAX request for that. You have to redirect the user instead:

window.location = '/connect/facebook'

So it's not what you would expect from a single page app, but the authorization_code OAuth2 flow and the similar OAuth1 one, that Grant is concerned with, requires redirecting to a third party server.

from grant.

jgauna avatar jgauna commented on April 28, 2024

Thanks! It works. The final question is, does Grant support sending appsecret_proof for Facebook security?

from grant.

simov avatar simov commented on April 28, 2024

The appsecret_proof parameter seems to be used for securing all requests after the initial user login. Check out here, the access token and the app secret are used to generate the app secret proof.

from grant.

jgauna avatar jgauna commented on April 28, 2024

yeah but when Grant generates the request it seems not to be sending this appsecret_proof=<generated-in-the-server>'. If i'm missing something I apologize

from grant.

simov avatar simov commented on April 28, 2024

Grant is concerned with providing you with access_token. You can't have appsecret_proof before having an access_token:

# the PHP code from the above link
$appsecret_proof= hash_hmac('sha256', $access_token, $app_secret); 

You have to generate the appsecret_proof after you get the access_token using Grant.

from grant.

jgauna avatar jgauna commented on April 28, 2024

oh, got it ! Thanks a lot for helping me. Regards.

from grant.

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.