-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathmanageSynapseCredentials.Rmd
40 lines (31 loc) · 1.42 KB
/
manageSynapseCredentials.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: "Manage Synapse Credentials"
author: "Tom Yu"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Manage Synapse Credentials}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
## Manage Synapse Credentials
There are multiple ways one can login to Synapse. We recommend users to choose the method that fits their workflow.
### One Time Login
Login using a personal access token obtained from synapse.org under your Settings. Note that a token must minimally have the view scope to be used with synapser. Learn how to [create a personal access token](https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#ManagingYourAccount-PersonalAccessTokens)
```
library(synapser)
synLogin(authToken="authtoken")
```
### Use `.synapseConfig`
For writing code using the `synapser` client, that is easy to share with others, please do not include your credentials in the code. Instead, please use `.synapseConfig` file. You can refer your collaborators to the following documentation on how to set up a `.synapseConfig` file.
First, create a `.synapseConfig` file in your home directory with the following content:
```
[authentication]
authtoken = <authtoken>
```
A personal access token generated from your synapse.org Settings can be used as your .synapseConfig authtoken.
Then login without specifying your username and password:
```
library("synapser")
synLogin()
```