diff --git a/src/domain/auth/AuthServer.js b/src/domain/auth/AuthServer.js index d0b21a7ddac9a6d8c6fdc376d05682ff9edd5b5a..b237b6d248186e63e37bd660a53701773f11600f 100644 --- a/src/domain/auth/AuthServer.js +++ b/src/domain/auth/AuthServer.js @@ -194,6 +194,8 @@ class KoaOAuthServer { const scopes = describeScopeRequest(query.scope) + console.log(scopes) + return ctx.render('auth/accept-oauth', { user, client, @@ -252,7 +254,32 @@ const scopeDescriptionMap = { icon: 'admin', name: 'Full Access', description: 'Full access to your account, including the ability to create, update and delete any user information, metrics and files.' - } + }, + 'metrics:create': { + name: 'Create Metrics', + description: 'The ability to add data metrics linked to your account. Remember that connected apps that create metrics will know your location!', + }, + 'files:upload': { + name: 'Upload Files', + description: 'The ability to upload images linked to your account', + }, + 'files:read': { + name: 'Read Files', + description: 'The ability to see and download images that you\'ve uploaded to your account', + }, + 'profile:read': { + name: 'Read Profile', + description: 'The ability to see any information associated with your user profile. This includes your name and email address', + }, + 'profile:write': { + name: 'Modify Profile', + description: 'The ability to edit any information associated with your user profile. This includes your name', + }, + 'profile:stats': { + name: 'Profile Stats', + description: 'The ability to see information about your account stats, including your points and citizen scientist level', + }, + } function describeScopeRequest(scope = '*') { const scopes = scope.split(' ')