Green-sell.info

Новые технологии
0 просмотров
Рейтинг статьи
1 звезда2 звезды3 звезды4 звезды5 звезд
Загрузка...

Have offline access

Всегда «Have Offline Access» | Google OAuth 2

Я пытаюсь получить профиль пользователя fetch с помощью Google OAuth2 api. После аутентификации пользователя, на странице согласия, меня всегда просят «Have Offline Access»

URL в браузере выглядит следующим образом :-

Как видно из URL выше, я передал параметр scope как ‘ email

«Эта область требует, чтобы вашему приложению был предоставлен доступ к:

адрес учетной записи пользователя Google email. Вы получаете доступ к адресу email при вызове people.get, который возвращает массив электронных писем (или при вызове people.getOpenIdConnect, который возвращает свойство email в OIDC-совместимый формат). имя домена Google Apps, если таковой имеется, то, к чему принадлежит пользователь. Доменное имя возвращается в качестве домена свойство из people.get (или hd свойство из getOpenIdConnect). Этот email область действия эквивалентна и заменяет собой https://www.googleapis.com/auth/userinfo.email сфера применения.»

Почему меня каждый раз просят об автономном доступе?

5 Ответов

У меня была та же проблема, и после долгого поиска в гугле я нашел эту ссылку:

он предлагает удалить ‘localhost’ в redirect_uri, и это работает для меня.

Потому что вы перенаправляете обратно в http (s)://localhost: / . Это имеет смысл, потому что любое приложение, которое запрашивает перенаправление на localhost, очевидно, работает локально.

Перенаправьте его на общедоступный веб-адрес, и он не будет беспокоить вас.

если вы используете модуль ‘everyauth’ узла js, вы можете переопределить значение по умолчанию googles на

Есть два параметра, которые могут вызвать это приглашение:

  • access_type (если это ‘offline’, получите токен обновления)
  • approval_prompt (если это ‘force’)

Ссылку на это можно найти здесь .

Попробуйте изменить параметр approval_prompt на ‘auto’ или добавить его в запрос, а параметр access_type проверить на ‘online’ или добавить его в запрос.

Похоже, вы зарегистрировали своего клиента как «Native Application» вместо «Web Application». Собственные приложения получают токен обновления по умолчанию, который является долгоживущим токеном, для которого владелец ресурса получает уведомление и экран согласия из-за присущих ему последствий для безопасности. Измените тип клиента на «Web Application», если это так.

Похожие вопросы:

У меня есть учетные данные учетной записи с доступом к Google Analytics, Я хочу использовать ядро аналитики Reporting API http://code.google.com/apis/analytics/docs/gdata/home.html Я нашел примеры.

Что именно означает слово offline в отношении автономного доступа, предоставляемого сервером OAuth? Означает ли это, что сервер ресурсов будет возвращать данные о пользователе даже тогда, когда.

Я настроил GPPSignInButton на основе следующего: https://developers.google.com/+/mobile/ios/sign-in#enable_server-side_api_access_for_your_app let googleSignIn = GPPSignIn.sharedInstance().

Я пытаюсь заставить OpenID работать с OAuth 2 для использования API Google. Я только хочу, чтобы пользователь должен был grant access один раз, когда они входят в систему в первый раз. Вот поток.

Я пытаюсь аутентифицировать с помощью OAuth2 с помощью Google Maps Coordinate, но у меня возникла проблема при указании области, для которой я хочу, чтобы токены аутентификации были действительны.

У меня есть сайт, где пользователи хотят иметь свой Календарь google Во всех примерах, похоже, владелец календаря аутентифицируется каждый раз. Есть ли способ проверить подлинность моего приложения.

Я пытаюсь заставить OAuth работать в небольшом скрипте Python. Я использую python-oauth2 ,и я пытаюсь подключиться к Google, чтобы перечислить Мои Документы Google. Получение маркера запроса и.

Я пытаюсь использовать Google Oauth для доступа к данным Google Analytics. Он отлично работает, за исключением токена. Токен истекает через час, и я не знаю, как его обновить. Там строка, где есть.

Существует ли ограничение скорости API для аутентификации на основе OAuth G+. Сценарий Рассмотрим, что 1000+ людей одновременно нажимают мой код для аутентификации своей учетной записи G+. Я.

Set up offline access to Docs editors

This article is for administrators. To access your own files offline, see Work on Docs, Sheets, & Slides offline.

As a G Suite administrator, you can control whether users in your organization can access their Google Docs, Sheets, and Slides when their computers aren’t connected to the internet. By default, offline access is enabled for organizations, and users can turn it on or off for their own accounts as needed.

If you are in the Drive web offline Beta these controls affect all Drive files, not just the Docs editors. Click the following link to apply to the Drive web offline Beta.

Note: This option does not apply to Drive File Stream. See Find & keep files and folders offline when using Drive File Stream.

Option 1: Use policies to control offline access from computers

As a G Suite administrator, you can use policies to control offline access to Docs, Sheets, and Slides on computers running Windows ® , Mac ® , and Linux ® operating systems. This option requires you to push managed policies to each computer. If you select this option before you set up policies, users lose offline access if they previously had it.

After you select this option, users can enable offline access only if a managed policy is installed on their computer. See the instructions below for each type of computer.

Note: This option is not available for ChromeOS devices or mobile devices (phones and tablets).

Step 1: Install the policy on each managed computer

To allow Drive files to be stored and accessed offline on managed computers:

  • Download the configuration files to the computers.
  • Distribute the files to computers running Windows®, Mac®, and Linux® operating systems.

See the instructions below for each type of computer.

Note: This process is not required if Allow all users to enable offline access is selected.

    Download and unzip these Windows Group Policy template files:

      Windows ADMX

      Windows ADML

      Note: If you see an error «Encountered an error while parsing», this means that Windows cannot parse the filename and you need to rename it. For example, try removing the underscore from the filename by changing GoogleDocs_WinADMX to GoogleDocsOffline.

      Related information

      • Editing Domain-Based GPOs Using ADMX Files (Microsoft Windows instructions)
      • Set Chrome policies for devices (Google instructions)
      1. Download and edit the policy.
        1. Download the macOS plist file.
        2. Open the file in any text editor.
        3. Edit the file to enable offline access.
          • (Required) To enable offline access for the devices, replace the first instance of «YOUR_DOMAIN_HERE.com» to your domain.
          • (Optional) To auto-enable offline doc access for all users with this policy, replace the second instance of «YOUR_DOMAIN_HERE.com» to your domain. Leave this unchanged if users must manually enable offline access.

      2. Save the file, if not auto-saved by your editor.
    1. Create a /Computers/local_computer node, if necessary. See Configuring Apps and Extensions by Policy. for instructions.
    2. Run the following command to import the updated plist file, or follow the instructions for your enterprise Mac management system:

      $ dscl -u admin_username /Local/Default -mcximport /Computers/local_computer GoogleDocs_MacConfig.plist

      $ sudo mcxrefresh -n username

      Offline files — access is denied

      Hello. I have this problem.
      I have Windows 7 PRO and when i try to make some directories available offline i get messge in sync center — Access is denied on almost every file. then i cannot access to these files. i cannot open/copy,move,delete these files (it seems like i dont have permission on it, but i have it). So i tried to solve this problem (many hours).

      I only managed these solutions:
      1/ when i turned off offline files in sync center and then i restarted OS, everything was OK. I could open, change, delete, copy, etc..every file. BUT i dont have these files oflline. O:(
      2/ i tried many steps, like completly delete offline files or i deleted CSC folder on windows folder. but nothing. everytime as i turned on offline files and some direcotries on server i made available offline, there was the same problem. ACCESS IS DENIES

      I have tried to find solution on many portals but nothing (i found some problems with this problem on Vista, and there was a repair KB, but for Win 7 isnt it. )

      Please help me.
      Is this officialy bug on Windows 7?
      Is this problem on PC or on server (i think this is problem on Win 7)? We have these problems on every PC in our company.
      We have Windows Server 2008 R2.

      Many thanks

      Question Info

      I have found the solution (in my case) and think I have deduced the cause.

      The solution was that encryption had been turned on under the one profile i.e. the normal user profile but not under any other profile. Once this is turned off, it worked again. Don’t be confused and think that if you have not enabled encryption on your disk then offline file encryption is disabled. The two are totally independent.

      NOW — to how did it happen?

      With the setting so deeply buried, and I am methodical about logging changes I make, there is no way I made that change (i.e. turn encryption on) manually.

      But of course, I was roaming. And every time you connect to a new network, you are asked whether the network is public/home/office and then it goes and changes some security settings. I think it is this «new network security settings» that made the change. It is quite possible that the behaviour was changed in a recent patch — the change of security settings like this would most likely not be advertised and might not even have been intentional.

      1) If, when you are roaming, your offline files become read only i.e. you cannot write changes back or store new files in the folders with a permissions error, then go to the sync center => manage offline files => encryption tab; if «unencrypt» is greyed out, then you have a different problem. If «unencrypt» is not greyed out i.e. can be enabled, then click this to turn encryption off.

      2) The logic of this is that you cannot sync encrypted files. And if you do encrypt them, they become read only and you cannot save new files in the offline folders.

      3) Permission errors (in this case) throw you off in completely the wrong direction. It was only due to the fact I have several laptops all with the same user that I was able to pin it down to the laptop/user combination.

      4) To scare you, you can still see the files, but often they indicate 0 bytes in size. This is another hint that it is not permissions, but something else (permissions normally prevent the files being seen, unless special permissions for traversal etc have been set up)

      5) If ANYTHING behaves differently after roaming, look further into what the public/home/work network selection mah have changed

      Progressive Web Apps 101: the What, Why and How

      What is a Progressive Web App? Why do we need one? How can we build one?

      Have you ever seen an “Add to Home Screen” banner, like above, while browsing a website? When you click the button, the “application” installs itself in the background. When you open this application that now sits in your app drawer, you can browse the same experience you were doing on your browser, but now right in your mobile phone.

      What you have now is a mobile app that was downloaded from a web application. All this, without even have to see the face of an app store.

      Getting the app was so easy! But that’s not even the best part. When you open this app, you will be able to browse the content even when you do not have internet. You have offline access to the app! How cool is that?

      What you’ve come across is a Progressive Web App (PWA). A PWA lets you install the application from the browser window itself, is available on your phone like a native app, and works offline, just like a native app.

      But what does it really mean for a web app to be progressive? Let’s take a deeper dive into what progressive web apps are, why I think they’re better than native apps, and what makes them different from traditional web apps.

      What is a Progressive Web App (PWA)?

      The term Progressive Web App was coined by Alex Russell and Frances Berriman. In Alex’s words:

      Progressive Web Apps are just websites that took all the right vitamins.

      It isn’t a new framework or technology. It is a set of best practices to make a web application function similar to a desktop or mobile application. The dream is to have an experience so uniform and seamless that the user is unable to tell the difference between a Progressive Web App and a native mobile app.

      Progressive web applications deliver user experiences through progressive enhancement. It essentially means that a PWA will perform the same functions on a new iPhone 8 as it would on an older generation iPhone. Sure, some features may not be available, but the app continues to work and perform like it should.

      Why do we need a Progressive Web App?

      Before we understand why we need a progressive web app, let’s talk about some of the challenges we are facing today with native and web apps.

      Internet speed: you may not realize this depending on where you live, but 60% of the world’s population is still using 2G internet. Even in the US, some people have to use dialup to access internet.

      Slow website load: Do you know how long a user waits to click the “Close X” button if a website is too slow? Three seconds! 53% of users abandon a website if it is too slow.

      High friction: People don’t want to install native apps. An average user installs 0 applications in a month.

      User engagement: Users spend most of their time in native apps, but mobile web reach is almost three times that of native apps. Hence, most of the users are not actively engaged. However, users are spending 80% of their time on only their top three native apps.

      PWAs help solve these problems. There are multiple reasons for using a progressive web app, but here are some of the top capabilities it provides:

      1. Fast: PWAs provide experiences that are consistently fast. From the moment a user downloads an app to the moment they start interacting with it, everything happens really fast. Because you can cache the data, it is extremely fast to start the app again even without hitting the network.
      2. Integrated user experience: PWAs feel and behave like native apps. They sit in a user’s home screen, send push notifications like native apps, and have access to a device’s functionalities like native apps. The experience feels seamless and integrated.
      3. Reliable experience: With the help of service workers, we can reliably paint a picture on a user’s screen even when network has failed.
      4. Engaging: Because we can send notifications to a user, we can really drive the engagement up by keeping the user notified and engaged with the app.

      In short, it is FIRE.

      How to build a Progressive Web App

      Google has published a checklist of items for Progressive Web apps. I will go over four minimum requirements for an application to be a PWA:

      1. Web App Manifest

      This is just a json file that gives meta information about the web app. It has information like the icon of the app (which a user sees after installing it in their app drawer), background color of the app, name of the app, short name, and so on. We can write this manifest file ourselves or we can use tools to generate one for us.

      2. Service Workers

      Service Workers are event-driven workers that run in the background of an application and act as a proxy between the network and application. They are able to intercept network requests and cache information for us in the background. This can be used to load data for offline use. They are a javascript script that listens to events like fetch and install, and they perform tasks.

      Here is a sample serviceworker.js

      3. Icon

      This is used to provide an app icon when a user installs the PWA in their application drawer. A jpeg image will just be fine. The manifest tool I highlighted above helps in generating icons for multiple formats, and I found it very useful.

      4. Served over HTTPS

      In order to be a PWA, the web application must be served over a secure network. With services like Cloudfare and LetsEncrypt, it is really easy to get an SSL certificate. Being a secure site is not only a best practice, it also establishes your web application as a trusted site for users demonstrating trust and reliability, and avoiding middle man attacks.

      Note: This is part 1 of 2 part series. In the next part, we will create a Progressive Web App from scratch with a skeleton index.html. Check out part 2 here.

      Did you learn something new? Have comments? Know a DevJoke? Tweet me @shrutikapoor08

      How to Set Up and Use Google Docs Offline

      You can work on your Google Drive files offline, but it takes a few steps to reach an internet-free zone. Here’s how to access files on Google Docs, Sheets, and Slides while you’re off the grid.

      For a free text editor, it’s hard to get much better than Google Docs. You can update your resume, work on a paper, or even write articles (like this one) right in your web browser.

      With Google Drive, you can access all your documents from any computer or mobile device where you’ve signed into your Google Account. That makes working entirely in the cloud an enticing possibility. You can drop what you’re doing on your work PC and pick it up later at home, or make quick changes on your phone. As long as you have an internet connection, it’s super convenient. The rub comes when you lose your connection.

      There are going to be times where you don’t have internet access but still need to edit a document. When you get on an airplane, or the internet goes down, all your work remains painfully inaccessible. Fortunately, you can get around this with a few quick steps so you can keep using Google Docs—and still have access to all your files—even when you’re offline.

      Here’s how to set up Google Docs to work offline. The same instructions work for Google Slides and Google Sheets.

      How to Set Up Google Docs Offline on Your PC

      Install Chrome

      The offline feature for Docs only works in Google’s own browser. If you’re using Firefox, Safari, Edge, or any other browser, download and install Chrome .

      Sign In to Your Google Account

      Everything you do in Google’s world is linked to your Google account, and Docs is no different. Sign into your account in Chrome after you’ve installed the browser.

      Download the Google Docs Offline Extension

      Chrome allows you to install browser extensions that add new features and enhance your overall experience. For offline access, this extension will let you use Google Docs, Slides, and Sheets even when you lose internet access.

      Enable Offline Access

      Open Google Docs and sign into your Google Account if you have not done so already. Click the hamburger menu in the top-left corner of the screen ( ), select Settings and enable the Offline toggle.

      Once you’ve done this, you’ll be able to continue editing and saving your documents whenever you lose internet access. Google will also download some of your most recent files so you can edit them even if you don’t already have them open. For older files, however, you’ll need to download them beforehand.

      How to Set Up Google Docs Offline on Mobile

      Enabling offline access for Docs is slightly simpler on your mobile devices.

      Download the Apps You Need

      Google offers separate apps for Google Drive, Docs, Slides, and Sheets on iOS and Android. Download the ones you need to the phones and tablets you’ll use while you’re offline.

      Make Recent Files Available Offline

      On the Drive app of your choice, tap the hamburger menu ( ) in the top-left corner, tap Settings, and enable the «Make recent files available online» toggle.

      When you enable the above toggle, it will apply to each account on your device. However, you’ll need to do so for each app, so repeat on the Slides and Sheets apps as needed.

      The mobile apps will automatically detect which files you’ve used frequently and keep a local copy available for you to use offline. However, if you need to make sure specific files are available, follow the steps in the next section.

      Make Specific Files Available Offline

      By default, Google will try to save space by only keeping local copies of files you’ve recently edited on your device. However, you have a couple of options if you want to make sure that certain files are always available. On your laptop, you can download Google Drive Backup and Sync to keep a local copy of all your files, or just certain folders, on the desktop. This will make Drive function a lot like Dropbox.

      However, if you only want to download specific files, f ind the file you want to keep in the app. T ap the three-dot «More» icon ( ) and enable the «Available offline» toggle. Repeat for each file you need. You can also open the file you need and the app should download it, but it never hurts to make sure.

      When you have a file available for offline use, you’ll see a circular symbol with a check mark inside it. When you’re editing the file without an internet connection, you’ll see a circular symbol with a lightning bolt next to the document’s name.

      Once you’re back online, changes will sync up and the symbols will disappear.

      Читать еще:  Access обработка событий
    Ссылка на основную публикацию
    Adblock
    detector