Comments (6)
Are you sure that MS supports implicit flow for native apps? Please add the link to their docs.
Please debug into the plugin in XCode (search for the plugin class. It's there I debug that way myself) and see how far the call gets.
from generic-oauth2.
ms does support implicit flow ,
Im not using the plugin anymore ,
thanks
from generic-oauth2.
OK, but just out of curiosity. What do you use instead?
from generic-oauth2.
I am changing window location to
https://login.microsoftonline.com/{org-id}/oauth2/v2.0/authorize?client_id={AzureAD_APPID}&redirect_uri=http%3A%2F%2Fwebserverurl%3A8082&scope=user.readwrite&response_type=token&state=&prompt=login
then telling capacitor via cap.conf to allow redirection to ms loginpage inside "allowNavigation"
{ "server": { "url": "https://webserverurl.com", "allowNavigation": [ "sts.domain.dk", "login.microsoftonline.com" ] } }
then
I grab the token from the returned uri "/#access_token=*****" via
parseTokenFromUrl(){
const HashKeyValueParsed_JSON = {};
window.location.hash.substring(1).split('&').forEach(function (x) {
var arr = x.split('=');
arr[1] && (HashKeyValueParsed_JSON[arr[0]] = arr[1]);
});
removeHash(){
let noHashURL = window.location.href.replace(/#.*$/, '');
window.history.replaceState('', document.title, noHashURL)
currently I am not able to set the the redirectURI to a specific IOS app scheme as capacitor://localhost, capacitor just complaining inside the console that's it is not a valid https url
for now the app is just encapsulated inside IOS webView kind of PWA app,
I really want to use the plugin instead of having a webserver I will follow the task you created sorry because I closed it I did not know you are investigating and digging to resolve , I thugt I was alone here
/Ibrahim
from generic-oauth2.
Thanks for that. I hope to find some time to investigate further next weekend.
from generic-oauth2.
The original issue had nothing to do with fragment
vs query
response mode but with the fact that the plugin didn't return the access token, when no resourceUrl
was configured.
This behavior will be introduced with version 2.0.0 of the plugin. see #75
from generic-oauth2.
Related Issues (20)
- Bug: Intent filter not working for redirection after login HOT 2
- Feat: Support Android 13 HOT 2
- Support for Capacitor 5 HOT 10
- Is there a way to get a login prompt? HOT 1
- Azure B2C ui_locales is directly supported via the auth request builder exception HOT 2
- I am not able to hide URL bar HOT 2
- accessTokenEndpoint quirk with django backend HOT 1
- Google with android says "Custom scheme URIs are not allowed for 'WEB' client type" HOT 3
- App Store Connect Issue
- Hide navigation bar and footer on iOS HOT 5
- Evidence of the use of safari
- Question: What kind of browser is used for login? HOT 1
- Feat: support universal links on iOS HOT 3
- Azure SSO; Response comes from azure, but does not come to authenticate
- capacitor-oauth2 - Azure SSO is not working in android and ios.Bug:
- Feat: Electron
- IOS 17 keyclock login not working
- Bug: Jest not working when using the plugin
- Feat: Add custom token fields
- Feat: option to disable authState.performActionWithFreshTokens() flow during authenticate
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 generic-oauth2.