Mobile authentication/authorization flow is very similar to the client-side flow, but it has a slightly different mechanism for handling the response data.
This document provides details no how to integrate Geni into an iPhone application.
Android and other mobile devices will work in a similar fashion.

Authentication & Authorization

To enter the authentication/authorization mobile flow, launch a browser from your mobile application and pass the following parameters to the authorization url:

Oauth URL

https://www.geni.com/platform/oauth/authorize

Parameters

Name

Description

Required

client_id

Application key generated during the app registration.

true

redirect_uri

URL that the user's browser will be redirected back to once app authorization is completed.
You can specify a custom URL that will be recognized by your mobile device, which launch your application.

true

response_type

For the mobile flow the response type should be set to "token".

true

display

For the mobile flow the display parameter should be set to "mobile".

true

scope

A comma delimited list of permissions that the application needs.
By default the scope is set to a full data access.
This is subject to change in the upcoming releases.

false

Example

By setting the display parameter to "mobile", you ensure that the login and the authorization screens will use a mobile layout.
The client_id parameter can be either your application key or your application id.
Application ids are shorter and can be used as registered urls of your mobile application.

Configuring iOS Callback

To register a callback to your iOS application, you must open your application's properties file and configure a custom url:

If the user is already logged in, we validate the login cookie that we have stored on the user's browser and authenticate the user.If the user is not logged in, they are prompted to enter their credentials:

Once we have successfully authenticated the user, we will prompt the user to authorize your application: