GithubHelp home page GithubHelp logo

loonix / capacitor-oauth2-azure-example Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 2.0 677 KB

Capacitor Oauth2 Azure B2C Example

Java 6.77% JavaScript 6.56% TypeScript 50.80% HTML 4.60% SCSS 31.27%
android capacitor ionic ios oauth2 web

capacitor-oauth2-azure-example's Introduction

Hi there ๐Ÿ‘‹, I'm Daniel Carneiro.

I'm from OPorto, Portugal, and currently a Front End Developer @ CADS UK.

ko-fi

GitHub stats

[Top Langs]

Profile views

capacitor-oauth2-azure-example's People

Contributors

loonix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

capacitor-oauth2-azure-example's Issues

logout on Android

Hello,

I was wondering how did you implement the logout on android, i'm using the below code but its not working. The browser is not being closed
Plugins.Browser.open({ url: environment.logoutURL }).finally(() => { setTimeout(() => Plugins.Browser.close(), 500); this.clearUser(); });

thanks for the help

Ios Issue

I used the capacitor oAuth plugin with azure keyclock in react+capacitor app, on web and android its working fine but on ios i am getting following

[error] - {"errorCode":"popup_window_error","errorMessage":"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.","subError":"","name":"BrowserAuthError","correlationId":"018f15ea-2c03-7c00-8bcb-26d56e54d6cd"}

How can we get rid of this issue

Auth Gaurd

Hi ,

My tech stack is Ionic angular , latest ionic 6. I am trying to build login screen. The identity provider that I am using for login is Azure AD B2C.
Thank you for the code example, using it I am able to login and authenticate but how do I create auth guard to protect internal pages ? can you help ?

Issues with redirectUrl for native application

Hi,

I've successfully managed to configure the web version of this project to authenticate as expected to an Azure ADb2c tenant.
Unfortunately, I am having issues with doing the same when running the project inside either Android or iOS.
The issue looks similar on both platform: after opening the login form and go through the auth process, they both try to redirect back to http://localhost:4200/home which is (as expected) the redirect URI for the web section of the configuration.
Can't really manage to debug the process more than that, given it's Azure service... But I've noticed quite a significant difference when it comes to redirection URI syntax between the capacitor-oauth2 (or this example) and what Azure control panel seems to suggest. I've obviously tried them both with no success.
Any clues? Someone else been through the same issue?
Thanks in advance.

Deep Linking on Android is not working

Describe the bug
Deep Linking on Android is not working

To Reproduce
Steps to reproduce the behavior:

  1. Implement Android as per instructions on GitHub.
  2. Provides user/pass on B2C screen presented.
  3. After authentication the screen doesn't redirect/go back to the main intent.

Expected behavior
The Login intent should close after successful authentication and the Access Token is generated.

Screenshots
Here is an example I got from chrome://inspect
image

I also tried changing the Scheme to use com.mydomain.app://oauth and it has the same behaviour.

Smartphone (please complete the following information):

  • Device: Android Emulator / Samsung S8
  • OS: Android 9

Additional context
I have checked issues 96 and 91 and no luck.
Appreciate any help on this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.