Connect OSM account
This commit is contained in:
17
app/routes/oauth/osm-callback.js
Normal file
17
app/routes/oauth/osm-callback.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { service } from '@ember/service';
|
||||
|
||||
export default class OauthOsmCallbackRoute extends Route {
|
||||
@service osmAuth;
|
||||
@service router;
|
||||
|
||||
async model() {
|
||||
try {
|
||||
await this.osmAuth.handleCallback();
|
||||
} catch (e) {
|
||||
console.error('Failed to handle OSM OAuth callback', e);
|
||||
} finally {
|
||||
this.router.transitionTo('index');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user