From 9d881453754ba6da88a03190f644bf5e1b9500ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Wed, 11 Dec 2024 17:32:09 +0100 Subject: [PATCH] feat: Remove cozy-authentication from playground --- playgrounds/README.md | 6 ------ playgrounds/package.json | 1 - playgrounds/src/common/App.jsx | 23 ++------------------ playgrounds/yarn.lock | 39 ++-------------------------------- 4 files changed, 4 insertions(+), 65 deletions(-) diff --git a/playgrounds/README.md b/playgrounds/README.md index d057d230..f1467f4f 100644 --- a/playgrounds/README.md +++ b/playgrounds/README.md @@ -4,12 +4,6 @@ yarn start ``` -If you work on a local cozy and you don't have https enabled you have to define a global `ALLOW_HTTP` var at start to be able to login (see this line in cozy-authentication https://github.com/cozy/cozy-libs/blob/master/packages/cozy-authentication/src/steps/SelectServer.jsx#L111). With `parcel` you can use the `--global` option to do so - -``` -yarn start --global __ALLOW_HTTP__ -``` - Don't forget to launch your browser with disabled CORS and write the full domain for your cozy when reaching http://localhost:1234/index.html : ``` diff --git a/playgrounds/package.json b/playgrounds/package.json index 8cdb57cc..0a5b3e78 100644 --- a/playgrounds/package.json +++ b/playgrounds/package.json @@ -9,7 +9,6 @@ "dependencies": { "@material-ui/core": "3.9.3", "@material-ui/lab": "^3.0.0-alpha.30", - "cozy-authentication": "^1.17.0", "cozy-client": "6.64.7", "cozy-device-helper": "^1.7.5", "cozy-doctypes": "^1.61.0", diff --git a/playgrounds/src/common/App.jsx b/playgrounds/src/common/App.jsx index f66267cf..31755442 100644 --- a/playgrounds/src/common/App.jsx +++ b/playgrounds/src/common/App.jsx @@ -1,7 +1,6 @@ import 'babel-polyfill' import React from 'react' -import { hashHistory } from 'react-router' import 'date-fns/locale/en/index' import { CozyProvider } from 'cozy-client' @@ -9,9 +8,7 @@ import { CozyProvider } from 'cozy-client' import 'cozy-ui/transpiled/react/stylesheet.css' import IconSprite from 'cozy-ui/transpiled/react/Icon/Sprite' import { Alerter, I18n } from 'cozy-ui/transpiled/react' -import { getUniversalLinkDomain } from 'cozy-ui/transpiled/react/AppLinker' import icon from './icon.png' -import { MobileRouter } from 'cozy-authentication' const styles = { error: { @@ -57,29 +54,13 @@ class ErrorBoundary extends React.Component { /** A generic App component, meant to be used by all examples */ class App extends React.Component { render() { - const { title, icon, client, children, existingStore } = this.props - /** - * We need to pass a loginPath with the current locationHash to be able - * to stay on the right page after a refresh since cozy-authentication - * redirect to loginPath after the login - */ - + const { client, children, existingStore } = this.props return ( ({})} lang="fr"> - - {children} - + {children} diff --git a/playgrounds/yarn.lock b/playgrounds/yarn.lock index b163bb3c..0072aa53 100644 --- a/playgrounds/yarn.lock +++ b/playgrounds/yarn.lock @@ -1711,17 +1711,6 @@ cosmiconfig@^5.0.0: js-yaml "^3.13.1" parse-json "^4.0.0" -cozy-authentication@^1.17.0: - version "1.17.2" - resolved "https://registry.yarnpkg.com/cozy-authentication/-/cozy-authentication-1.17.2.tgz#4decb93846490fab58d29f273a36b9301d1a3543" - integrity sha512-1M4Nk3lPoRUP0xfcIp25Nq7CBdzimtNYNQxWOFeYlqeoHWk7a7G5sGbxwTQ0Vsm7O2RqXeaRYEYlUyTtmdumMA== - dependencies: - cozy-device-helper "^1.7.5" - localforage "1.7.3" - prop-types "15.7.2" - react-markdown "4.0.8" - url-polyfill "1.1.0" - cozy-client@6.64.7: version "6.64.7" resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-6.64.7.tgz#ea8655a8956e2f06a2953515bebb4a70bca64d5f" @@ -3002,11 +2991,6 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -3572,13 +3556,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= - dependencies: - immediate "~3.0.5" - loader-utils@^1.0.0, loader-utils@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" @@ -3588,13 +3565,6 @@ loader-utils@^1.0.0, loader-utils@^1.1.0: emojis-list "^2.0.0" json5 "^1.0.1" -localforage@1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.7.3.tgz#0082b3ca9734679e1bd534995bdd3b24cf10f204" - integrity sha512-1TulyYfc4udS7ECSBT2vwJksWbkwwTX8BzeUIiq8Y07Riy7bDAAnxDaPU/tWyOVmQAcWJIEIFP9lPfBGqVoPgQ== - dependencies: - lie "3.1.1" - lodash-es@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0" @@ -4775,7 +4745,7 @@ promise@^7.1.1: dependencies: asap "~2.0.3" -prop-types@15.7.2, prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -4956,7 +4926,7 @@ react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.2, react-lifecycles resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== -react-markdown@4.0.8, react-markdown@^4.0.8: +react-markdown@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-4.0.8.tgz#e3621b5becaac82a651008d7bc8390d3e4e438c0" integrity sha512-Z6oa648rufvzyO0KwYJ/9p9AsdYGIluqK6OlpJ35ouJ8HPF0Ko1WDNdyymjDSHxNrkb7HDyEcIDJCQs8NlET5A== @@ -6135,11 +6105,6 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -url-polyfill@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/url-polyfill/-/url-polyfill-1.1.0.tgz#d34e1a596d954b864bc8608f84c592820df422db" - integrity sha512-QAbzqCwd84yA6VyjV30aZXla+lrRmczDurvlsVnK+tFOu677ZNGz8shcFWQRp5BF9/z7qvNiCQLqpWPtVoUEBg== - url-search-params-polyfill@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/url-search-params-polyfill/-/url-search-params-polyfill-7.0.0.tgz#98b56ed29e67710588fdc3c361083b0f78303d95"