Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jevakallio committed Feb 20, 2018
1 parent 0ec8e3d commit 9ba11a9
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ const validateClientId = clientId =>
const validateRedirectUrl = redirectUrl =>
invariant(typeof redirectUrl === 'string', 'Config error: redirectUrl must be a string');

export const authorize = ({ issuer, redirectUrl, clientId, scopes, additionalParameters, dangerouslyAllowInsecureHttpRequests = false }) => {
export const authorize = ({
issuer,
redirectUrl,
clientId,
scopes,
additionalParameters,
dangerouslyAllowInsecureHttpRequests = false,
}) => {
validateScopes(scopes);
validateIssuer(issuer);
validateClientId(clientId);
validateRedirectUrl(redirectUrl);
// TODO: validateAdditionalParameters

const nativeMethodArguments = [
issuer,
redirectUrl,
clientId,
scopes,
additionalParameters
]
const nativeMethodArguments = [issuer, redirectUrl, clientId, scopes, additionalParameters];
if (Platform.OS === 'android') {
nativeMethodArguments.push(dangerouslyAllowInsecureHttpRequests);
}
Expand All @@ -34,7 +35,14 @@ export const authorize = ({ issuer, redirectUrl, clientId, scopes, additionalPar
};

export const refresh = (
{ issuer, redirectUrl, clientId, scopes, additionalParameters, dangerouslyAllowInsecureHttpRequests = false },
{
issuer,
redirectUrl,
clientId,
scopes,
additionalParameters,
dangerouslyAllowInsecureHttpRequests = false,
},
{ refreshToken }
) => {
validateScopes(scopes);
Expand All @@ -50,7 +58,7 @@ export const refresh = (
clientId,
refreshToken,
scopes,
additionalParameters
additionalParameters,
];

if (Platform.OS === 'android') {
Expand Down

0 comments on commit 9ba11a9

Please sign in to comment.