Cookie Consent pop up not showing up on Astro.js Project - astrojs

Cookie Consent not showing up on my website: https://mytopcountries.web.app/
`
document.addEventListener('DOMContentLoaded', function () {
cookieconsent.run({"notice_banner_type":"simple","consent_type":"express","palette":"light","language":"en","page_load_consent_levels":["strictly-necessary"],"notice_banner_reject_button_hide":false,"preferences_center_close_button_hide":false,"page_refresh_confirmation_buttons":false,"website_name":"uspekhi","website_privacy_policy_url":"https://uspekhi.web.app/"});
});
Free cookie consent management tool by TermsFeed Policy Generator
`
I have created an index.html file in the public folder
I have deployed the website on Firebase, and addded Cookie Consent by TermsFeed https://www.TermsFeed.com
on index.html in the public folder, however it does not pop up on the live page: https://mytopcountries.web.app/

Related

Vue3 with Sanctum - Subdomains get unauthenticated even user login successfully

I'm having an application with 5 different sub-applications where they use multiple sub-domains under one main domain with vue2. Everything working with vue2 implementations. And I'm trying to implement auth UIs (its a separate vue3 project) with the below technologies
Vue 3.2
2.Vue router 4.1
3.Vite 3.0
4.Pinia 2.0
So my applications are like below with vue2
Auth app (localhost:3000)
Profile app (localhost:3001)
Dashboard app (localhost:3002)
At the moment I have implemented all the functionalities related to Auth app with vue3. But I'm having an issue with that. So initial applications will work as follow.
User gets authenticated via auth app and then redirect to Profile app
If the user clicks on the dashboard app link it will redirect the user back to auth app with redirect_uri so that when it redirects to auth app will check auth status and if the user is authenticated then the user will be redirected to the redirect_uri which comes with router query.
At the moment this is working with vue2. But it's not working with vue3.
How does it work with Vue3.
Send a get request to /sanctum/csrf-cookie and then send a post request with email and password.
After successful login redirect the user to the Profile app. (But app says unauthenticated for all requests and it will redirect back to auth app - 3000)
I use the below configurations
import axios from "axios";
const instance = axios.create({
withCredentials: true,
baseURL: import.meta.env.VITE_APP_API_URL,
headers: {
Accept: "application/json",
"Content-Type": "application/json",
},
});
If I use Vue 2 auth app then everything works as required.
IF I REFRESH THE PAGE AFTER LOGIN WITHOUT REDIRECTING THE USER TO PROFILE IT WILL SUCCESSFULLY GET THE CURRENT USER. BUT ASS SOON AS I REDIRECT USER TO PROFILE THEN IT SAYS Unauthenticated AND REDIRECT TO LOGIN. AT THIS MOMENT USER IS UNAUTHENTICATED AND NEEDS TO RE-LOGIN.
I have referred so many answers at Laracast and StackOverflow. But wasn't able to find the exact issue. Really appreciate any help on this one.
Thanks

loginPopup does not redirect to redirectUri in the original tab but opens redirectUri on Popup in D365

I'm using MSAL in a react based SPA and a PCF component which is imported into a canvas app and this canvas app is embedded into Dynamic365 Field service CRM.
I have created a Azure AAD app registration and added these redirectUri in Single Page Application
localhost:3001
*.crm.dynamics.com/main.aspx //main.aspx because i referenced this Issue #190 earlier.
So when i open my app in localhost:3001, it work fine. It popup a login window ask for login and when close it gives a access token in response. but in second condition pop up is not redirecting back to it's main page but opens in the popup itself.
I have used this inside PCF component which i am using in D365 Field service.
import { PublicClientApplication } from "#azure/msal-browser";
const msalConfig = {
auth: {
clientId: 'client_id',
authority: 'https://login.microsoftonline.com/tanent_id',
redirectUri: '*.crm.dynamics.com/main.aspx',
}
};
const msalInstance = new PublicClientApplication(msalConfig);
var loginRequest = {
responseMode:"query",
scopes: ["openid", "offline_access", "https://storage.azure.com/user_impersonation"],
};
msalInstance.loginPopup(loginRequest)
.then(response => {
console.log(response)
})
.catch(err => {
console.log(err)
});
Reproduction Steps
Create a PCF component with above Code Snippets.
Add this PCF component inside a canvas app.
Embed new created canvas app inside a D365 Field Service CRM.
When you open your PCF component inside the D365 Field Service CRM which runs on this *.crm.dynamics.com/main.aspx, It will open a login Popup. we have to login from that popup.
This popup does not close but open the redirect URL inside the popup only.
and I have added redirect URI inside App registration like this
I have already used every variant like *.crm.dynamics.com/main.aspx and *.crm.dynamics.com/ and *.crm.dynamics.com.
Expected Behavior
A login popup pops up and after the user logs in the pop up closes itself and the loginPopup promise resolves (or rejects).
Actual Behavior
A login popup pops up and after the user logs in the pop up redirects back to my site in the pop up.

Having problem with getting credentials for Google+ API

After setting the Consent page and enabling Google+ API,
when I try to get credentials for this API there is no option to choose Google+ API on the "Add credentials to your project" page.
Do you have the same problem in the meanwhile or I have to do something else?
That scenario has been expired.
Now I found out that I have to just create an OAuth Client ID
Select my application type, add my Authorized JavaScript origins, and Authorized redirect URIs manually.
"Authorized JavaScript origins" are your application base domains that you want to implement external login Js library like
<script src="https://apis.google.com/js/platform.js" async defer></script>
"Authorized redirect URIs" are the pages that you want to redirect the user after login

Laravel login with Facebook

Frequently got this error when trying to login with Facebook.
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://
This is what I got.
Provider function:
public function redirectToProvider()
{
return Socialite::driver('Facebook')->redirect();
}
Call back function:
public function handleProviderCallback()
{
$user = Socialite::driver('Facebook')->user();
}
there are two ways to fix this
First one is to create a virtual host (HTTPS)
The easy one is to disable ENFORCE HTTPS in your facebook app settings
APP -> Facebook login -> Client OAuth Settings

Redirect to user's web application login url on Jasper server's session time out

I am embedding my Web application reports with tibco-jasper soft version 6 and above server. My users will access their reports from web application by clicking on a link which is provided in web application. There will be separate token validation done for user login from web application to jasper server. I have configured same time for session. When jasper server session's time out, it is getting redirected to jasper's login page. But I just want to redirect that into my custom url (e.g. My web application's login page).
What i can do now? I am new to jasper.
In WEB-INF/jsp/modules/login/login.jsp add this to the top of the file:
<script>
if (window.top != window.self) {
window.parent.location = <your-application-url>;
}
</script>

Resources