I have an application wherein it should work both in chrome and IE. API call using resource(ngResource) is working fine in chrome/Firefor - able to get response in success block when api is success. But in IE11 same api is going into error block. Please let me know if any configuration is required in resource factory.
Related
I have an api and frontend I'm trying to connect.
The frontend and API are deployed on a kubernetes cluster. I'm calling a GET method to populate some data and the data is not being loaded from the api. I checked the method call from chrome and the API url is appended twice.
For example, a successful GET request to my API to load this data would be example.app.com/users and the url chrome is showing in debug for the GET request is example.app.com/example.app.com/users.
I verified the API GET method works and returns the data I need. Any idea what I might be doing wrong?
Are you passing "example.app.com/users" to the function that executes the GET API?
If you pass "/users", does the result work as you expect?
I am using OKTA default APIs( /api/v1/users/${userId}/sessions) for closing session across all the devices. The functionality is working as expected but the status is showing the API call is failed.
And also when we validate through Postman the 204 response code is returning but in angularjs the API call is failing.
Below is the API reference page which I have used in my application
https://developer.okta.com/docs/reference/api/users/#user-sessions
Please find the attached screenshot for your reference
Postman Response
There are few OKTA APIs which will support backend only for security reasons. So I have added client.endAllUserSessions(user.id)" method in my backend to remove user session across all devices. It is working fine for me.
(/api/v1/users/${userId}/sessions) API is failed in front end So we should call the "client.endAllUserSessions(user.id)" method in backend(Node JS) to clear user session.
For older okta-sdk-nodejs versions We Should call "client.endAllUserSessions(user.id)" method. For latest okta-sdk-nodejs versions We Should call "client.clearUserSessions(user.id)" method.
Thanks,
Subash.E
I got a problem, my API laravel doesn't work when it run on my reactjs. When I check, i got failed response data. But,it work fine in postman. Here's my code
This is in reactjs :
This code in ReactJs
and this is in laravel API :
this code in laravel API
i use axios to get response from my API, and i have already set my cors before in my Laravel, just one function can't get response.
here the respons :
response in postman
response in console log react when use chrome
response in network google chrome
I already try to set up cors again and try to change method put to get and put to post, and still doesnt work. I don't know where the problem is.
Maybe you can try to connect with jquery or javascript XMLHttpRequest to make sure where is the problem
My AngularJS project is working with an API. This API provides authentication tokens (Oauth): an access_token and a refresh_token.
Everytime an AngularJS request to the API returns a 401 error, it means that the access_token has expired and it needs to be refreshed by sending the refresh_token to a specific URL. To do that, I followed this tutorial.
But this is not working and I don't know why. I would like to debug the function placed into .config(...) but I don't know how to do that. console.log() and $rootScope = ... doesn't work here.
Thanks for your help !
Use your browser's built-in debugger.
Chrome: https://developer.chrome.com/devtools/docs/javascript-debugging
Firefox: https://developer.mozilla.org/en-US/docs/Tools/Debugger
Firebug: http://getfirebug.com/javascript
IE: https://msdn.microsoft.com/en-us/library/gg699336%28v=vs.85%29.aspx
This is killing me.
So I have a backbone site where when the user logs in, a GET request is made to the server and an access token is returned. Everything is working in FF, Chrome, IE10.
When I look at code inspector in IE9, the network tab does not list the get request to my API at all (not even as pending or failed). When I console log "error.status or error.statusText", it returns with:
0 Error: Access is denied.
My API has "Access-Control-Allow-Origin: *" enabled. I have also added "jQuery.support.cors = true;" to my initialize function in router.js. Now I am just out of ideas! I would really prefer not to setup a proxy.
if you are using backbone than probably you are using jQuery too, so i think you should check this post : Simple jQuery post not working on Internet Explorer 9 (access denied)