This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { SvelteKitAuth, Providers } from 'sk-auth'; | |
// this is the domain we set up in our Cognito Pool | |
const DOMAIN = 'sveltekit.auth.eu-west-1.amazoncognito.com'; | |
// these are the configuration seetings for our OAUTH2 provider | |
const config = { | |
accessTokenUrl: `https://${DOMAIN}/oauth2/token`, | |
profileUrl: `https://${DOMAIN}/oauth2/userInfo`, | |
authorizationUrl: `https://${DOMAIN}/oauth2/authorize`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm i sk-auth --save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run dev -- --open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// we'll edit this later | |
let user; | |
</script> | |
<svelte:head> | |
<title>SvelteKit - Cognito</title> | |
</svelte:head> | |
{#if !user} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm init svelte@next sveltekit-cognito-auth | |
# I'm choosing the Skeleton project, | |
# opting out of TypeScript for this tutorial | |
# and using ESlint and Prettier support | |
cd sveltekit-cogniton-auth | |
npm install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az vm create --resource-group nym-node-burn --name nym --image UbuntuLTS --admin-username robertohuertasm --admin-password hZRAAJpjkwZ4KW --nics "/subscriptions/e3871cc7-3444-42ad-b4b8-5ee6bdbf6d54/resourceGroups/nym-node-burn/providers/Microsoft.Network/networkInterfaces/nym-nic" --location westeurope --size "Standard_B1s" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<service android:name=".EndlessService"" android:stopWithTask="false" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onTaskRemoved(rootIntent: Intent) { | |
val restartServiceIntent = Intent(applicationContext, EndlessService::class.java).also { | |
it.setPackage(packageName) | |
}; | |
val restartServicePendingIntent: PendingIntent = PendingIntent.getService(this, 1, restartServiceIntent, PendingIntent.FLAG_ONE_SHOT); | |
applicationContext.getSystemService(Context.ALARM_SERVICE); | |
val alarmService: AlarmManager = applicationContext.getSystemService(Context.ALARM_SERVICE) as AlarmManager; | |
alarmService.set(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime() + 1000, restartServicePendingIntent); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IMPORTANT!: ALL SECTIONS ARE MANDATORY | |
[licenses] | |
# This indicates which are the only licenses that Licensebat will accept. | |
# The rest will be flagged as not allowed. | |
accepted = ["MIT", "MSC", "BSD"] | |
# This will indicate which licenses are not accepted. | |
# The rest will be accepted, except for the unknown licenses or dependencies without licenses. | |
# unaccepted = ["LGPL"] | |
# Note that only one of the previous options can be enabled at once. | |
# If both of them are informed, only accepted will be considered. |