Comments (4)
Erm... the library only works with json for some very good reasons. Why, do you see something else?
from hello.js.
Sorry I didn't explain it well. Im using Ruby on Rails with Devise, so for make it work manually without reload the page I need to post back on my callback_url as JSON.
This is an example using the FB JSDK (Sorry i only have it on coffeescript)
$(document).ready ->
$("#facebook-connect").click (e) ->
e.preventDefault()
FB.login (response) ->
if response.authResponse
$.getJSON '/auth/facebook/callback', (data) ->
# Do more stuff for login
When I use the hello.js library, the Hello.login() function do the callback, but I receive on my server the callback as dataType = "text/html"
Started GET "/auth/facebook/callback" for 127.0.0.1 at 2014-06-03 10:47:10 -0500
Processing by Devise::OmniauthCallbacksController#facebook as HTML
Instead im looking to mod the dataType of the ajax callback, only for the login method, like dataType = "application/json"
Started GET "/auth/facebook/callback" for 127.0.0.1 at 2014-06-03 10:49:14 -0500
Processing by Devise::OmniauthCallbacksController#facebook as JSON
I hope now its more clear. Thanks for your response.
from hello.js.
Sorry its still hard to understand. If you want to change the xhr request in hello.api() then take a look at https://github.com/MrSwitch/hello.js/blob/master/src/modules/windows.js#L145
Since the OAuth flow works by opening pages with test/html, i fail to grasp what you mean when you say "post back on my callback_url as JSON.".
from hello.js.
@JNajera please comment and i'll reopen this if its still an issue
from hello.js.
Related Issues (20)
- The hello('google').api('me') doesn't work HOT 1
- [feature] classic form of errors
- Overwrite state query parameter
- Multiple Potential XSS Vulnerability HOT 1
- Amazon - Dealing with the Implicit Grant Depreciated Issue / implementing Authorization code grant HOT 1
- Prototype Pollution in hello.js
- I cant get birdthday or address in google HOT 1
- is hellojs not has typescript version ?
- Facebook API aren't working HOT 2
- Auth Server is down HOT 1
- VK CANT LOGIN ANY MORE HOT 2
- Is the Google integration using the Google Identity Service
- Facebook Auth Login Error
- [Question] Redirect issue on Iphone 12 pro max
- hello('twitter').getAuthResponse() Sending Response as null
- Must specify access token via Authorization header. https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param
- Error: Cannot create system vault due to missing client CTX
- How can I customize hellojs to use with other oidc sources (eg. authentik)?
- https://auth-server.herokuapp.com/#signin login twitter failed. try some errors!
- https://auth-server.herokuapp.com/ cant not use and show 404 -Something changed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hello.js.