Comments (4)
Hi,
Nonce is a required part of request and response in OpenID Connect. See MS documentation here:
We can not remove it as it's a part of standard.
from react-native-azure-auth.
@vmurin I checked the response access token in jwt. But It shows an invalid signature. Can you help me?
from react-native-azure-auth.
@SahilRS200 Can you help me for jwt token issue. Are you fixed on this? I think your issue also same like this right?
from react-native-azure-auth.
Hi Abdulrahman
I have double checked your issue. I think your are using some wrong key/certificate to validate the token.
Take a look on MS documentation here
And then following article describing JWT.io usage.
As I can see from your screenshots you are using v1 of Azure access points. Your key ID (kid) is "HBxl9mAe6gxavCkcoOU2THsDNa0". And then in the screenshot with the keys I see the public key starting with "MIIBIjANBgk..." but the right key with this kid (from x5c prop) here https://login.microsoftonline.com/common/discovery/keys is "MIIDBTCCAe2gAwI..."
- So try to use the correct public key from the link above
- Enclose the key in appropriate header/footer like this
-----BEGIN CERTIFICATE-----
MIIDBTCCAe2gAwI.......
-----END CERTIFICATE-----
-
Leave the private key field empty (it is not used for verification)
-
Find a small code example that also worked for me below.
let jwt = require('jsonwebtoken');
let fs = require('fs');
const decodedValidToken = async (accessToken) => {
const key = await fs.readFile('public.pem');
return await jwt.verify(accessToken, key, function(err, decoded) {
if (err) {
console.log('ERROR: ', err);
}
return decoded;
});
}
const decodedToken = decodedValidToken('eyJ0eXAiOiJKV1QiLC.....PLACE YOUR DATE HERE or READ it with readFile e.g.')
.then(decodedToken => console.log(decodedToken));
Good luck
Vladi
from react-native-azure-auth.
Related Issues (20)
- Authentication IOS: Network request failed with face ID (IOS)
- ClearSession WebView iOS error when closing HOT 2
- Azure MFA Network Failure on iOS HOT 3
- Logout Redirect issue HOT 5
- First login attempt always fails HOT 3
- Expo Support HOT 1
- Logout WebView Not Closing HOT 3
- AcquireTokenSilent not working HOT 1
- [iOS] - Popup name edit HOT 2
- AcquireTokenSilent error - [TypeError: Cannot read property 'accessToken' of null] HOT 8
- i cant able to sign out from azuare ad. am usseing this in react native web
- Hide the address bar HOT 4
- Not able to change the authorityUrl/issuer using the authorize method HOT 11
- Data dog Rum is supported react native web ? HOT 1
- ClearSession is showing prompt to Sign In when user wants to Logout in iOS HOT 8
- Login screen is blank
- Is it possible to obtain the accessToken in JWT format? HOT 1
- Account login in app with lib not show MFA, but login with safari have MFA
- android stuck on "continue", does nothing HOT 6
- I using redirect_uri = myapp://app when login auto bypass not show MFA
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 react-native-azure-auth.