Skip to content
New issue

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

Are scopes for ManifestApp defined in the library manifest? #1

Open
mhawksey opened this issue Nov 22, 2017 · 7 comments
Open

Are scopes for ManifestApp defined in the library manifest? #1

mhawksey opened this issue Nov 22, 2017 · 7 comments

Comments

@mhawksey
Copy link

Great work!

I was wondering if in the library code you had defined the required scopes in the manifest for the library? I believe doing so would mean when the user adds the library the scopes will be automatically detected and not have to be manually added to the users script project manifest.

@tanaikech
Copy link
Owner

tanaikech commented Nov 22, 2017

@mhawksey

Thank you for your comments. Yes. I think that your comments are correct. In my environment, when this library was installed and saved the project, the required scopes are automatically installed to user's project. But since I had not been able to confirm whether this always occurs, I didn't written about this. I couldn't find about this at Google. When I knew that this always occurs, I would like to add about it to README.md.

Now, I set "oauthScopes" to this library as follows.

"oauthScopes": [
  "https://www.googleapis.com/auth/script.external_request",
  "https://www.googleapis.com/auth/script.scriptapp",
  "https://www.googleapis.com/auth/drive",
  "https://www.googleapis.com/auth/drive.scripts"
]

In my environment, I confirmed that the new project installed this library has the same scopes as the default scopes. If this also occurs at your environment, this can be published as the true.

If it's so, I think that this will be a big news for the GAS developers. By installing the library set "oauthScopes", users are not required to manually install the scopes.

Now, the situation that I confirmed is as follows.

  • By installing the library which was given "oauthScopes" of Manifests, the new project can automatically have those scopes as the default scopes.
  • And when users create the scripts in the project installed the library, the scopes depended on the scripts is automatically installed to the project.

If I could confirm that other users also occur this, I would like to publish this as a news.

Can you confirm this at your environment? If this occurred also at your environment, I'm glad.

@mhawksey
Copy link
Author

Having researched manifest files I believe it is correct that script projects will automatically inherit scopes defined in a library if no scopes have been defined in the script project. I have written about this here (and have provided examples for ManifestApp :)

@tanaikech
Copy link
Owner

Thank you for your reply. I saw the URL. That's a great report. And I appreciate that MinifestApp is included in it. Thank you so much.

I would like to publish about the automatic addition of scopes to projects using Library, as a report. And I would like to update README.md on GitHub. At that time, can I include the URL of your report? I will report when I published.

@tanaikech
Copy link
Owner

I could publish the report at here. Thank you so much.

@mhawksey
Copy link
Author

Thank you for the acknowledgement. Great work, I'm a big fan m(_ _)m

@tanaikech
Copy link
Owner

Thank you, too!

@histteacher
Copy link

@tanaikech, thank you for this tool! @mhawksey , thank you for the blog! I would not have found this tool or clear directions on creating a manifest file in Apps Script without the video and slide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants