Ionic 3 Authorization issue: JWT: AuthHttp request contains no token in iOS

Closed Posted 5 years ago Paid on delivery
Closed Paid on delivery

I got a problem with sending the token with the authhttp/http request.

Only on iOS my http requests are failing. The server (API) always responds with a 401 Unauthorized: “A token is required”.

This is my flow: user logs in > gets token from API > stores token in NativeStorage (normal storage broken in iOS) > redirect to profile page > does a [login to view URL] GET request for the user info with a token in the header > receives requested user info from API

=> the GET requests always errors.

I’ve tried using http request with a header, options, etc. I’ve tried to use [login to view URL] (was original request in my app, works on Android & browser) and I’ve tried to use the native advanced HTTP requests. But none of these methods work, because there is no token sent with the request, although I include a header.

Tried (almost) every solution I’ve found, but none works.

It is not a CORS problem, because the login request ([login to view URL]([login to view URL] + ’/get_token, creds) returns a token from that same API.

So in general: there is a problem with sending the token in a header with the request, because the API doesn’t receive one.

Project needs:

1/ you have to have a Bitbucket account

2/ you have to be able to test the solution yourself on an iPhone (not simulator etc) — we use Ionic pro for quick deploys

3/ A team member is able to provide more info and support on Skype

Ionic Framework iOS Development Mobile App Development

Project ID: #17980500

About the project

5 proposals Remote project Active 5 years ago

5 freelancers are bidding on average €170 for this job

mekiho

Hello employer Can I help you I am very confident in your project So if you hire me, you will get wonderful result. Looking for work with you. Thanks

€155 EUR in 3 days
(121 Reviews)
7.8
amitadlakha04

Hi There I will solve problem with sending the token with the authhttp/http request.i am able to provide you support on $kype Thanks

€155 EUR in 3 days
(9 Reviews)
4.3
makwanadeveloper

Hi, I am working on ionic since ionic 2 is released. I will solved your issue. I have Bitbucket account.

€155 EUR in 5 days
(0 Reviews)
0.0