Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fjern facebook som påloggingstjeneste #374

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/locale/phrases/phrases-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ const phrases = {
privacyFirstPart: "By signing in to this service I am hereby accepting the principles in the NDLA ",
privacyLinkText: "privacy policy",
privacySecondPart: " and I am giving my consent to NDLA’s use of my personal information.",
missingFacebook: {
title: "Do you miss Facebook login?",
description:
"Login with Facebook is removed because of low usage. You can still log in with Google to access your learningpaths, as long as you use the same email address as before. You can create a free Google account with <strong>your existing</strong> email address at google.com.",
},
},
logoutSession: {
title: "Logout",
Expand Down
5 changes: 5 additions & 0 deletions src/locale/phrases/phrases-nb.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ const phrases = {
privacyFirstPart: "Ved å logge på denne tjenesten aksepterer jeg herved vilkårene i NDLAs ",
privacyLinkText: "personvernpolicy",
privacySecondPart: ", og jeg gir mitt samtykke til at NDLA bruker min personlige informasjon.",
missingFacebook: {
title: "Savner du Facebook-pålogging?",
description:
"Pålogging med Facebook er fjernet på grunn av lav bruk. Du kan fremdeles logge inn med Google og få tilgang til dine læringsstier, så lenge du bruker samme epostadresse som tidligere. Du kan opprette en gratis Google-konto med <strong>din eksisterende</strong> e-postadresse på google.com.",
},
},
logoutSession: {
logutLearningpathSite: "Logg ut av læringssti",
Expand Down
5 changes: 5 additions & 0 deletions src/locale/phrases/phrases-nn.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ const phrases = {
privacyFirstPart: "Ved å logge på denne tenesten aksepterer eg med dette vilkåra i NDLA sin ",
privacyLinkText: "personvernpolicy",
privacySecondPart: ", og eg gir samtykke til at NDLA kan bruke min personlege informasjon.",
missingFacebook: {
title: "Saknar du Facebook-pålogging?",
description:
"Pålogging med Facebook er fjerna på grunn av lav bruk. Du kan framleis logge inn med Google og få tilgang til læringsstiane dine, så lenge du brukar samme epostadresse som tidligare. Du kan opprette ein gratis Google-konto med <strong>di eksisterande</strong> e-postadresse på google.com.",
},
},
logoutSession: {
logutLearningpathSite: "Logg ut av læringssti",
Expand Down
14 changes: 5 additions & 9 deletions src/session/#Providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
*/

import parse from "html-react-parser";
import React from "react";
import { HelmetWithTracker } from "@ndla/tracker";
import polyglot from "../i18n";
Expand All @@ -27,17 +28,12 @@ const LoginProviders = () => (
Google
</button>
</li>
<li className="vertical-menu_item">
<button
type="button"
onClick={() => loginPersonalAuth("facebook")}
className="un-button cta-link cta-link--block cta-link--fb"
>
Facebook
</button>
</li>
</ul>
</div>
<div className="privacy-text">
<h4 className="privacy-text">{polyglot.t("loginProviders.missingFacebook.title")}</h4>
<p className="privacy-text">{parse(polyglot.t("loginProviders.missingFacebook.description"))}</p>
</div>
<p className="privacy-text">
{polyglot.t("loginProviders.privacyFirstPart")}
<a target="_blank" rel="noopener noreferrer" href="https://ndla.no/article/personvernerklaering">
Expand Down
4 changes: 2 additions & 2 deletions src/session/__tests__/#Providers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test("component/#Providers", () => {

const buttons = component.find(".cta-link");

expect(buttons.length).toBe(2);
expect(buttons.length).toBe(1);

expect(buttons.map((n) => n.text())).toEqual(["Google", "Facebook"]);
expect(buttons.map((n) => n.text())).toEqual(["Google"]);
});
1 change: 1 addition & 0 deletions src/style/base/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,6 @@ aside {

.privacy-text {
margin: 0 auto;
margin-bottom: 1em;
text-align: center;
}
Loading