Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9188119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:56:03+00:00 2026-06-17T19:56:03+00:00

I have been using spring-security-facebook grails plugin in a website and it works like

  • 0

I have been using spring-security-facebook grails plugin in a website and it works like a charm.

In fact, it works so well, that I haven’t had to dig too much into how it works and that’s probably why I am stuck right now.

I have a webapp that exposes a json REST API . Authentication can be done using user/password or by using facebook credentials, and for that I’ve been using this plugin.
I just need authentication and user’s email. I’ve been using the redirect filter for this purpose (FacebookAuthRedirectFilter).
It works perfect in this context.

Right now I am trying to build a mobile application using phonegap, so my mobile app is purely html,js and css, and want to interact with the same webapp using AJAX requests.

The problem arises, because in the mobile app context, the html files are local (and they need to be this way),as they are bundled with the application.

My question is how can I authenticate user in this case?

If I leave as it is, after a succesfull login the mobile app will be redirected to the webapp’s domain, and will stop getting the local html files, which is not what I want.

I suppose I need some sort of client authentication, and then send an AJAX request to my webapp adding the facebook cookie somehow, so subsequent AJAX request to the webapp are already authenticated.

But I may be totally wrong and it should be done in a different way.

Any help will be really apreciated.

(I can elaborate or add any clarification if is not clear, just ask).

EDIT

After going through Igor’s suggestion, I have made some changes in the plugin to have the FacebookAuthDirectFilter in place to test the signedRequest approach, and also I have integrated phonegap-facebook-plugin in my phonegap App.

I can succesfully login to facebook in the device, but I am not able to retrieve the signedRequest in the mobile side.

As this thread suggests JS SDK getLoginStatus doesn't return userID nor signedRequest, it may not be possible to get the signedRequest in this case.

However, I have the userId and the access_token in the mobile side, which is all I need (I think) to get the user info.
Can I authenticate a user with this info in the spring-security-facebook grails plugin?
(The FacebookAuthRedirectFilter uses a ‘code’ I don’t have)

There’s another tweak here, because the access_token is different if the user connects through a common web site and if the user connects from the mobile. The plugin stores one, and I am not sure what implications it may have.

thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:56:04+00:00Added an answer on June 17, 2026 at 7:56 pm

    I think you should make authentication on your side (I believe Android can do that) and provide authentication tokens to server (AJAX call).

    But the problem it’s not really supported by the plugin, at this moment. Plugin have FacebookAuthDirectFilter filter for this purpose (but it’s not tested and not documented).

    This filter currently accepts only Signed Request as parameter named signedRequest. Btw, with next release it will support Access Token as parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on application that is using spring security. I am quite
I have been trying out the spring-security-facebook plugin and so far its been smooth.
I have been using spring security with @PreAuthorize on my controller methods. My reasoning
I have been using Spring Security 2.x for some time now, but recently I
I'm developing a Grails (Version 1.3.3) Web-Application using the Grails Spring-Security Plugin, Spring-Security-Core-1.0.1 (which,
I have been using spring for a while as my IOC. It has also
I have been using the new feature of Spring 3.1.1 the java based configuration.
I have been using TortoiseSVN for some time and I really like it. I
I have noticed that after my Grails app has been deployed for about 2
I have a j2ee web application using spring web flow ang spring security. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.