Coder Social home page Coder Social logo

Comments (6)

vmurin avatar vmurin commented on July 24, 2024 1

OK. I will answer the questions separately.

1) Silent login

It is your own application ;) and it is only up to you to do silent or interactive login!!! If you want to remove saved tokens and thereby make the silent login impossible - just do it!!!

Add before clearSession():

await azureAuth.auth.clearPersistenCache(userId)

1) Interactiv login

At first take a look at this comment

I can not confirm the interactiv login problem. I checked it on android emulator - after logout I am always re-prompted for password!
On logout I get the following two screens and the next login is a normal login also with user name (e-mail) prompt!

1

Screenshot_1573629781

2

Screenshot_1573631379

from react-native-azure-auth.

vmurin avatar vmurin commented on July 24, 2024 1

One another option for interactive login - use prompt parameter on authorize() See docs

let tokens = await azureAuth.webAuth.authorize({scope: 'openid profile User.Read', prompt: 'login'})

In this case the user will be always prompted for name and password and you do not have to logout in order to login under another user.

I also added explicit option closeOnLoad for clearSession() method. Before it was true by default, but worked only for iOS. Now you can choose by yourself to show logout browser window mentioned in previous comment or not. Taking into account current Azure behavior it should be always like this:

...
azureAuth.webAuth
    .clearSession({closeOnLoad: false})
...

So this would be the first option that I would try.

With this additions I think the issue is solved. Please reopen if not :)

from react-native-azure-auth.

vmurin avatar vmurin commented on July 24, 2024

it is not even showing login screen

What happens instead?

from react-native-azure-auth.

skyshine999 avatar skyshine999 commented on July 24, 2024

It is directly logging in means silent login is happening. Here main issue is it is not clearing browser session.
Expected: Browser should show Microsoft login screen with username field

from react-native-azure-auth.

vmurin avatar vmurin commented on July 24, 2024

Do you see the browser window at all? You do not have the silent login method call in your code. Or you talking not about the code above?
Do you want to say - browser window opens and closes immediately?
This are two completely different questions - 1) silent login works after logout 2) browser login works after logout without password re-prompt...

from react-native-azure-auth.

skyshine999 avatar skyshine999 commented on July 24, 2024

Yes whatever questions you mentioned.
Browser should clear session, it should show first time microsoft login behaviour

from react-native-azure-auth.

Related Issues (20)

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.