We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@vmurin @0xc14m1z when i trying to logout it will not rediret to my website
// msalInstance.js import { PublicClientApplication } from "@azure/msal-browser"; import {CLIENT_ID,COGNITO_REDIRECT_URI_PART_THREE,COGNITO_REDIRECT_URI_HOST,COGNITO_REDIRECT_URI_HOST_DEVICE, COGNITO_REDIRECT_URI_PART_TWO,COGNITO_REDIRECT_URI_PART_ONE,IDP} from '@env'; import { Platform } from "react-native";
const host = Platform.OS === 'web' ? COGNITO_REDIRECT_URI_HOST: COGNITO_REDIRECT_URI_HOST_DEVICE;
const msalConfig = { auth: { clientId: CLIENT_ID, // Replace with your Azure AD application client ID authority: 'tenant_id' redirectUri:'http://localhost:8080/sign-in } };
let instance: PublicClientApplication; @ 0xc14m1z
export const getMsalInstance = () => { if (!instance) { instance = new PublicClientApplication(msalConfig); } return instance; }; MY LOGOT call const logout = async () => { try { console.error("Attempting to logout"); const msalInstance = getMsalInstance(); // Directly get the instance await msalInstance.logoutRedirect(); console.error("Logout redirect called"); } catch (error) { console.error("Logout error:", error); } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@vmurin @0xc14m1z
when i trying to logout it will not rediret to my website
// msalInstance.js
import { PublicClientApplication } from "@azure/msal-browser";
import {CLIENT_ID,COGNITO_REDIRECT_URI_PART_THREE,COGNITO_REDIRECT_URI_HOST,COGNITO_REDIRECT_URI_HOST_DEVICE,
COGNITO_REDIRECT_URI_PART_TWO,COGNITO_REDIRECT_URI_PART_ONE,IDP} from '@env';
import { Platform } from "react-native";
const host = Platform.OS === 'web' ? COGNITO_REDIRECT_URI_HOST: COGNITO_REDIRECT_URI_HOST_DEVICE;
const msalConfig = {
auth: {
clientId: CLIENT_ID, // Replace with your Azure AD application client ID
authority: 'tenant_id'
redirectUri:'http://localhost:8080/sign-in
}
};
let instance: PublicClientApplication;
@ 0xc14m1z
export const getMsalInstance = () => {
if (!instance) {
instance = new PublicClientApplication(msalConfig);
}
return instance;
};
MY LOGOT call
const logout = async () => {
try {
console.error("Attempting to logout");
const msalInstance = getMsalInstance(); // Directly get the instance
await msalInstance.logoutRedirect();
console.error("Logout redirect called");
} catch (error) {
console.error("Logout error:", error);
}
};
The text was updated successfully, but these errors were encountered: