jeffreylees / reactnative-jwts Goto Github PK
View Code? Open in Web Editor NEWAuthenticating a React Native app with JSON Web Tokens
Authenticating a React Native app with JSON Web Tokens
I am not able to get the proper response from server -
_userLogin() {
var value = this.refs.form.getValue();
if (value) {
fetch("https://****************.com/Login", {
method: "POST",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: value.username,
password: value.password,
})
})
Response-
I/ReactNativeJS(14257): Running application "Ecommerce" with appParams: {"initia
lProps":{},"rootTag":1}. DEV === true, development-level warning are ON, per
formance optimizations are OFF
I/ReactNativeJS(14257): server status responseData--------------------------{"ty
pe":"default","status":702,"ok":false,"headers":{"map":{"connection":["keep-aliv
e"],"transfer-encoding":["chunked"],"content-type":["application/json;charset=IS
O-8859-1"],"date":["Sat, 19 Aug 2017 11:07:44 GMT"],"server":["nginx/1.10.2"]}},
"url":"https://****************.com/Login","_bodyInit":"user not found","_bodyText":"user
not found"}
why i am getting _bodyInit":"user not found","_bodyText":"user
not found" even when i passed parameters in form .?? any suggestions?
Hi.
Alas, it didn't compile. I get the following errors:
** BUILD FAILED **
The following build commands failed:
CompileC /Users/thinklog/Development/react_native/reactnative-jwts/ios/build/Build/Intermediates/RCTLinking.build/Debug-iphonesimulator/RCTLinking.build/Objects-normal/x86_64/RCTLinkingManager.o RCTLinkingManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/thinklog/Development/react_native/reactnative-jwts/ios/build/Build/Intermediates/A0RNLock.build/Debug-iphonesimulator/A0RNLock.build/Objects-normal/x86_64/A0ObjectSerializer.o A0RNLock/Core/A0ObjectSerializer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/thinklog/Development/react_native/reactnative-jwts/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTWebSocketExecutor.o RCTWebSocketExecutor.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(3 failures)
Any ideas what's happening and why, and how to correct it would be much appreciated.
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.